diff options
author | Waylan Limberg <waylan@gmail.com> | 2007-10-08 01:36:05 +0000 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2007-10-08 01:36:05 +0000 |
commit | a75df2c7bf2325449fdecc613290f126b7141ccb (patch) | |
tree | f37a5c25f0237774e66b5a224241bec5225bfa73 /markdown.py | |
parent | e26b6af09b5277711a89ebada8118bd7ab259de3 (diff) | |
download | markdown-a75df2c7bf2325449fdecc613290f126b7141ccb.tar.gz markdown-a75df2c7bf2325449fdecc613290f126b7141ccb.tar.bz2 markdown-a75df2c7bf2325449fdecc613290f126b7141ccb.zip |
Fixed lazy blockquote and added tests
Diffstat (limited to 'markdown.py')
-rw-r--r-- | markdown.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/markdown.py b/markdown.py index adcce81..e1e7dae 100644 --- a/markdown.py +++ b/markdown.py @@ -1442,15 +1442,22 @@ class Markdown: dequoted = [] i = 0 + blank_line = False # allow one blank line between paragraphs for line in lines : m = RE.regExp['quoted'].match(line) if m : dequoted.append(m.group(1)) i += 1 + blank_line = False + elif not blank_line and line.strip() != '' : + dequoted.append(line) + i += 1 + elif not blank_line and line.strip() == '' : + dequoted.append(line) + i += 1 + blank_line = True else : break - else : - i += 1 blockquote = self.doc.createElement('blockquote') parent_elem.appendChild(blockquote) |