diff options
Diffstat (limited to 'markdown')
-rw-r--r-- | markdown/postprocessors.py | 2 | ||||
-rw-r--r-- | markdown/util.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/markdown/postprocessors.py b/markdown/postprocessors.py index 672953a..071791a 100644 --- a/markdown/postprocessors.py +++ b/markdown/postprocessors.py @@ -72,7 +72,7 @@ class RawHtmlPostprocessor(Postprocessor): return html.replace('"', '"') def isblocklevel(self, html): - m = re.match(r'^\<\/?([^ ]+)', html) + m = re.match(r'^\<\/?([^ >]+)', html) if m: if m.group(1)[0] in ('!', '?', '@', '%'): # Comment, php etc... diff --git a/markdown/util.py b/markdown/util.py index c1bf658..998211e 100644 --- a/markdown/util.py +++ b/markdown/util.py @@ -15,12 +15,12 @@ Constants you might want to modify ----------------------------------------------------------------------------- """ -BLOCK_LEVEL_ELEMENTS = re.compile("p|div|h[1-6]|blockquote|pre|table|dl|ol|ul" +BLOCK_LEVEL_ELEMENTS = re.compile("^(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul" "|script|noscript|form|fieldset|iframe|math" "|ins|del|hr|hr/|style|li|dt|dd|thead|tbody" "|tr|th|td|section|footer|header|group|figure" "|figcaption|aside|article|canvas|output" - "|progress|video") + "|progress|video)$") # Placeholders STX = u'\u0002' # Use STX ("Start of text") for start-of-placeholder ETX = u'\u0003' # Use ETX ("End of text") for end-of-placeholder |