Skip to content

Commit

Permalink
Fixed #22. Horizontal rules now work in a few more crazy edge cases. …
Browse files Browse the repository at this point in the history
…Who actualy useses these? Anyway, we now match markdown.pl.
  • Loading branch information
Waylan Limberg committed Jun 16, 2011
1 parent 77d67a4 commit 619613e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markdown/blockprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def run(self, parent, blocks):
class HRProcessor(BlockProcessor):
""" Process Horizontal Rules. """

RE = r'[ ]{0,3}(?P<ch>[*_-])[ ]?((?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.
Expand Down

1 comment on commit 619613e

@davidchambers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know.

Apparently Mango's test suite does, though. ;)

https://bitbucket.org/davidchambers/mango-experimental/changeset/d4a25fa950ca

Please sign in to comment.