From 619613e2d65cc339e3950483916ce29ed675b4fc Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Thu, 16 Jun 2011 05:37:46 -0400 Subject: [PATCH] Fixed #22. Horizontal rules now work in a few more crazy edge cases. Who actualy useses these? Anyway, we now match markdown.pl. --- markdown/blockprocessors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/blockprocessors.py b/markdown/blockprocessors.py index 26959322a..7223da44a 100644 --- a/markdown/blockprocessors.py +++ b/markdown/blockprocessors.py @@ -460,7 +460,7 @@ def run(self, parent, blocks): class HRProcessor(BlockProcessor): """ Process Horizontal Rules. """ - RE = r'[ ]{0,3}(?P[*_-])[ ]?((?P=ch)[ ]?){2,}[ ]*' + RE = r'[ ]{0,3}((-+[ ]{0,2}){3,}|(_+[ ]{0,2}){3,}|(\*+[ ]{0,2}){3,})[ ]*' # Detect hr on any line of a block. SEARCH_RE = re.compile(r'(^|\n)%s(\n|$)' % RE) # Match a hr on a single line of text.