diff options
author | ryneeverett <ryneeverett@gmail.com> | 2014-05-21 16:01:59 -0400 |
---|---|---|
committer | ryneeverett <ryneeverett@gmail.com> | 2014-05-21 16:01:59 -0400 |
commit | a47899fd0f8f6086a3682abbbbbd75b60928d8c7 (patch) | |
tree | a82f139b79fd833fa73d58f40c597235fb689801 /markdown/preprocessors.py | |
parent | 85be15973e754da6cdee855968f9464676520667 (diff) | |
download | markdown-a47899fd0f8f6086a3682abbbbbd75b60928d8c7.tar.gz markdown-a47899fd0f8f6086a3682abbbbbd75b60928d8c7.tar.bz2 markdown-a47899fd0f8f6086a3682abbbbbd75b60928d8c7.zip |
Fix issue308 and fix (unrelated) failure to break out of nest loop.
Diffstat (limited to 'markdown/preprocessors.py')
-rw-r--r-- | markdown/preprocessors.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/markdown/preprocessors.py b/markdown/preprocessors.py index 1e10cfc..5bfca55 100644 --- a/markdown/preprocessors.py +++ b/markdown/preprocessors.py @@ -143,7 +143,7 @@ class HtmlBlockPreprocessor(Preprocessor): """ Same effect as concatenating the strings in items, finding the character to which stringindex refers in that string, - and returning the item in which that character resides. + and returning the index of the item in which that character resides. """ items.append('dummy') i, count = 0, 0 @@ -175,8 +175,8 @@ class HtmlBlockPreprocessor(Preprocessor): if len(items) - right_listindex <= 1: # last element right_listindex -= 1 placeholder = self.markdown.htmlStash.store('\n\n'.join( - items[i:right_listindex])) - del items[i:right_listindex] + items[i:right_listindex + 1])) + del items[i:right_listindex + 1] items.insert(i, placeholder) return items |