aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/preprocessors.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2014-11-19 21:00:36 -0500
committerWaylan Limberg <waylan.limberg@icloud.com>2014-11-19 21:00:36 -0500
commitc2498b92236afceae77f51343086c6a8d4350f4a (patch)
tree60710f46d9449af778a2e8759f5aba7bc157e0f1 /markdown/preprocessors.py
parented0ff55087235db8a3f02e10d6a1ed603ef4c476 (diff)
parent5d913699758a5815bc114a9e8c08db61eb206a5d (diff)
downloadmarkdown-c2498b92236afceae77f51343086c6a8d4350f4a.tar.gz
markdown-c2498b92236afceae77f51343086c6a8d4350f4a.tar.bz2
markdown-c2498b92236afceae77f51343086c6a8d4350f4a.zip
Merge pull request #371 from facelessuser/master
Issue #368: Fix Markdown in raw HTML stops working
Diffstat (limited to 'markdown/preprocessors.py')
-rw-r--r--markdown/preprocessors.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/markdown/preprocessors.py b/markdown/preprocessors.py
index 4a1fac5..ed11c39 100644
--- a/markdown/preprocessors.py
+++ b/markdown/preprocessors.py
@@ -174,9 +174,10 @@ class HtmlBlockPreprocessor(Preprocessor):
else: # raw html
if len(items) - right_listindex <= 1: # last element
right_listindex -= 1
+ offset = 1 if i == right_listindex else 0
placeholder = self.markdown.htmlStash.store('\n\n'.join(
- items[i:right_listindex + 1]))
- del items[i:right_listindex + 1]
+ items[i:right_listindex + offset]))
+ del items[i:right_listindex + offset]
items.insert(i, placeholder)
return items