diff options
-rw-r--r-- | markdown/blockprocessors.py | 2 | ||||
-rw-r--r-- | markdown/preprocessors.py | 2 | ||||
-rw-r--r-- | tests/extensions/legacy_attrs.html | 10 | ||||
-rw-r--r-- | tests/extensions/legacy_attrs.txt | 22 | ||||
-rw-r--r-- | tests/extensions/legacy_em.html | 1 | ||||
-rw-r--r-- | tests/extensions/legacy_em.txt | 1 |
6 files changed, 3 insertions, 35 deletions
diff --git a/markdown/blockprocessors.py b/markdown/blockprocessors.py index 39719aa..332c3a7 100644 --- a/markdown/blockprocessors.py +++ b/markdown/blockprocessors.py @@ -300,6 +300,8 @@ class OListProcessor(BlockProcessor): """ Process ordered list blocks. """ TAG = 'ol' + # Lazy ol - ignore startswith + LAZY_OL = True # The integer (python string) with which the lists starts (default=1) # Eg: If list is intialized as) # 3. Item diff --git a/markdown/preprocessors.py b/markdown/preprocessors.py index be1b504..74d1c9f 100644 --- a/markdown/preprocessors.py +++ b/markdown/preprocessors.py @@ -179,7 +179,7 @@ class HtmlBlockPreprocessor(Preprocessor): right_listindex -= 1 if right_listindex <= i: right_listindex = i + 1 - placeholder = self.markdown.htmlStash.store('\n\n'.join( + placeholder = self.md.htmlStash.store('\n\n'.join( items[i:right_listindex])) del items[i:right_listindex] items.insert(i, placeholder) diff --git a/tests/extensions/legacy_attrs.html b/tests/extensions/legacy_attrs.html deleted file mode 100644 index e11c301..0000000 --- a/tests/extensions/legacy_attrs.html +++ /dev/null @@ -1,10 +0,0 @@ -<h1 id="inthebeginning">Header </h1> -<p>Now, let's try something <em class="special">inline</em>, to see if it works</p> -<p>@id=TABLE.OF.CONTENTS}</p> -<ul> -<li id="TABLEOFCONTENTS"></li> -</ul> -<p id="TABLEOFCONTENTS">Or in the middle of the text </p> -<p id="tableofcontents"></p> -<p><a href="http://fourthought.com/"><img alt="" src="http://fourthought.com/images/ftlogo.png" style="float: left; margin: 10px; border: none;" title="Fourthought logo" /></a></p> -<p><img alt="img" id="foo" src="http://example.com/i.jpg" /></p>
\ No newline at end of file diff --git a/tests/extensions/legacy_attrs.txt b/tests/extensions/legacy_attrs.txt deleted file mode 100644 index 8988409..0000000 --- a/tests/extensions/legacy_attrs.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Header {@id=inthebeginning} - -Now, let's try something *inline{@class=special}*, to see if it works - -@id=TABLE.OF.CONTENTS} - - -* {@id=TABLEOFCONTENTS} - - -Or in the middle of the text {@id=TABLEOFCONTENTS} - -{@id=tableofcontents} - -[](http://fourthought.com/) - -![img{@id=foo}][img] - - [img]: http://example.com/i.jpg - diff --git a/tests/extensions/legacy_em.html b/tests/extensions/legacy_em.html deleted file mode 100644 index c4f1381..0000000 --- a/tests/extensions/legacy_em.html +++ /dev/null @@ -1 +0,0 @@ -<p><em>connected</em>words_</p>
\ No newline at end of file diff --git a/tests/extensions/legacy_em.txt b/tests/extensions/legacy_em.txt deleted file mode 100644 index cf500b5..0000000 --- a/tests/extensions/legacy_em.txt +++ /dev/null @@ -1 +0,0 @@ -_connected_words_
\ No newline at end of file |