From 67053db8986d6b8593be9ce59ed9534269adfba8 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sat, 23 Feb 2008 03:34:22 +0000 Subject: Allow one or two spaces before a blockquote. Fixes [1899925] That report actually askes for three spaces in imitation of markdown.pl. However, the syntax rules overrule markdown.pl (even per J.G.) and the rules give no such allowance for any spaces. Such spaces have been a subject of debate on the list as well. As it turns out, in python-markdown, allowing 3 spaces creates some problems for nested blockquotes (i.e.: a codeblock in a blockquote would need to be indented 5 spaces rather than 4.) Since we can't be breaking that currently correct and expected behavior, I'll conceed and allow 2. After all, markdown is supposed to be easier for humans to read and edit. One or two spaces are not so easy for the human eye to detect, so we'll allow them. Three looks much more like 4, so I don't care that we don't allow that many. --- markdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown.py b/markdown.py index 1c6587b..b0ceacf 100644 --- a/markdown.py +++ b/markdown.py @@ -1130,7 +1130,7 @@ class CorePatterns: 'isline2': r'(\-*)', # --- 'isline3': r'(\_*)', # ___ 'tabbed': r'((\t)|( ))(.*)', # an indented line - 'quoted': r'> ?(.*)', # a quoted block ("> ...") + 'quoted': r'[ ]{0,2}> ?(.*)', # a quoted block ("> ...") } def __init__ (self): -- cgit v1.2.3