aboutsummaryrefslogtreecommitdiffstats
path: root/markdown
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2015-04-07 19:50:25 -0400
committerWaylan Limberg <waylan.limberg@icloud.com>2018-07-31 10:20:53 -0400
commit15acbdec8c9357b78435af707140b0278cf376b2 (patch)
tree2fc8ed6ef8a8fe38978dcd755ebadf0a5d269370 /markdown
parent7f36cdd25f0c8d163be4d6904914576feccbbe44 (diff)
downloadmarkdown-15acbdec8c9357b78435af707140b0278cf376b2.tar.gz
markdown-15acbdec8c9357b78435af707140b0278cf376b2.tar.bz2
markdown-15acbdec8c9357b78435af707140b0278cf376b2.zip
Remove lazy_ol keyword. Use sane_lists extension instead.
This was adapted from 11408e50 of the md3 branch.
Diffstat (limited to 'markdown')
-rw-r--r--markdown/blockprocessors.py4
-rw-r--r--markdown/core.py2
-rw-r--r--markdown/extensions/sane_lists.py1
3 files changed, 4 insertions, 3 deletions
diff --git a/markdown/blockprocessors.py b/markdown/blockprocessors.py
index 378c7c7..f3e1fa7 100644
--- a/markdown/blockprocessors.py
+++ b/markdown/blockprocessors.py
@@ -325,6 +325,8 @@ class OListProcessor(BlockProcessor):
# 3. Item
# The ol tag will get starts="3" attribute
STARTSWITH = '1'
+ # Lazy ol - ignore startswith
+ LAZY_OL = True
# List of allowed sibling tags.
SIBLING_TAGS = ['ol', 'ul']
@@ -385,7 +387,7 @@ class OListProcessor(BlockProcessor):
# This is a new list so create parent with appropriate tag.
lst = util.etree.SubElement(parent, self.TAG)
# Check if a custom start integer is set
- if not self.parser.md.lazy_ol and self.STARTSWITH != '1':
+ if not self.LAZY_OL and self.STARTSWITH != '1':
lst.attrib['start'] = self.STARTSWITH
self.parser.state.set('list')
diff --git a/markdown/core.py b/markdown/core.py
index b031715..2144f00 100644
--- a/markdown/core.py
+++ b/markdown/core.py
@@ -50,7 +50,6 @@ class Markdown(object):
option_defaults = {
'tab_length': 4,
'smart_emphasis': True,
- 'lazy_ol': True,
}
output_formats = {
@@ -75,7 +74,6 @@ class Markdown(object):
* "html": Outputs HTML style tags.
* tab_length: Length of tabs in the source. Default: 4
* smart_emphasis: Treat `_connected_words_` intelligently Default: True
- * lazy_ol: Ignore number of first item of ordered lists. Default: True
"""
diff --git a/markdown/extensions/sane_lists.py b/markdown/extensions/sane_lists.py
index 7fb4fd6..479da04 100644
--- a/markdown/extensions/sane_lists.py
+++ b/markdown/extensions/sane_lists.py
@@ -25,6 +25,7 @@ import re
class SaneOListProcessor(OListProcessor):
SIBLING_TAGS = ['ol']
+ LAZY_OL = False
def __init__(self, parser):
super(SaneOListProcessor, self).__init__(parser)