aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKar Epker <karepker+services@gmail.com>2015-06-01 20:55:37 -0400
committerKar Epker <karepker+services@gmail.com>2015-06-01 20:55:37 -0400
commit99257e467eb01d921711c382be4141e97ecb3433 (patch)
treeb4d0503cb51845d33c73ed72cb9826a6d01273a7
parentd3cc9895fee28161f2537c0cbedf75b89cfd0a89 (diff)
downloadmarkdown-99257e467eb01d921711c382be4141e97ecb3433.tar.gz
markdown-99257e467eb01d921711c382be4141e97ecb3433.tar.bz2
markdown-99257e467eb01d921711c382be4141e97ecb3433.zip
Updated BlockProcessor to new-style class. Changed subclasses to use super().
-rw-r--r--markdown/blockprocessors.py8
-rw-r--r--markdown/extensions/sane_lists.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/markdown/blockprocessors.py b/markdown/blockprocessors.py
index d4bb2ac..870151b 100644
--- a/markdown/blockprocessors.py
+++ b/markdown/blockprocessors.py
@@ -38,7 +38,7 @@ def build_block_parser(md_instance, **kwargs):
return parser
-class BlockProcessor:
+class BlockProcessor(object):
""" Base class for block processors.
Each subclass will provide the methods below to work with the source and
@@ -141,7 +141,7 @@ class ListIndentProcessor(BlockProcessor):
LIST_TYPES = ['ul', 'ol']
def __init__(self, *args):
- BlockProcessor.__init__(self, *args)
+ super(ListIndentProcessor, self).__init__(*args)
self.INDENT_RE = re.compile(r'^(([ ]{%s})+)' % self.tab_length)
def test(self, parent, block):
@@ -309,7 +309,7 @@ class OListProcessor(BlockProcessor):
SIBLING_TAGS = ['ol', 'ul']
def __init__(self, parser):
- BlockProcessor.__init__(self, parser)
+ super(OListProcessor, self).__init__(parser)
# Detect an item (``1. item``). ``group(1)`` contains contents of item.
self.RE = re.compile(r'^[ ]{0,%d}\d+\.[ ]+(.*)' % (self.tab_length - 1))
# Detect items on secondary lines. they can be of either list type.
@@ -414,7 +414,7 @@ class UListProcessor(OListProcessor):
TAG = 'ul'
def __init__(self, parser):
- OListProcessor.__init__(self, parser)
+ super(UListProcessor, self).__init__(parser)
# Detect an item (``1. item``). ``group(1)`` contains contents of item.
self.RE = re.compile(r'^[ ]{0,%d}[*+-][ ]+(.*)' % (self.tab_length - 1))
diff --git a/markdown/extensions/sane_lists.py b/markdown/extensions/sane_lists.py
index 3b2da05..828ae7a 100644
--- a/markdown/extensions/sane_lists.py
+++ b/markdown/extensions/sane_lists.py
@@ -27,7 +27,7 @@ class SaneOListProcessor(OListProcessor):
SIBLING_TAGS = ['ol']
def __init__(self, parser):
- OListProcessor.__init__(self, parser)
+ super(SaneOListProcessor, self).__init__(parser)
self.CHILD_RE = re.compile(r'^[ ]{0,%d}((\d+\.))[ ]+(.*)' %
(self.tab_length - 1))
@@ -37,7 +37,7 @@ class SaneUListProcessor(UListProcessor):
SIBLING_TAGS = ['ul']
def __init__(self, parser):
- UListProcessor.__init__(self, parser)
+ super(SaneUListProcessor, self).__init__(parser)
self.CHILD_RE = re.compile(r'^[ ]{0,%d}(([*+-]))[ ]+(.*)' %
(self.tab_length - 1))