HR preceeded by word doesn't render as HR · Issue #897 · Python-Markdown/markdown (original) (raw)

Input:

***test***
***

Output (second line will be rendered as a literal ***):

test ***

Expected output according to Markdown.pl:

test


The same problem occurs with --- and ___ as HR.

I think it can be fixed by changing RE in HRProcessor:

497c497 < RE = r'^[ ]{0,3}((-+[ ]{0,2}){3,}|(_+[ ]{0,2}){3,}|(*+[ ]{0,2}){3,})[ ]*'

RE = r'^[ ]{0,3}((-+[ ]{0,2}){3,}|(_+[ ]{0,2}){3,}|(\*+[ ]{0,2}){3,})[ ]*$'