aboutsummaryrefslogtreecommitdiffstats
path: root/markdown.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2007-10-08 01:36:05 +0000
committerWaylan Limberg <waylan@gmail.com>2007-10-08 01:36:05 +0000
commita75df2c7bf2325449fdecc613290f126b7141ccb (patch)
treef37a5c25f0237774e66b5a224241bec5225bfa73 /markdown.py
parente26b6af09b5277711a89ebada8118bd7ab259de3 (diff)
downloadmarkdown-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.py11
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)