aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2012-01-30 05:53:51 -0500
committerWaylan Limberg <waylan@gmail.com>2012-01-30 05:53:51 -0500
commitc56085ee71fd67567a3d08964f7d48a93abe7fbc (patch)
tree291c7ec1445202081498cbc68678b21ac705d77a
parent07f2057734b745793e7ad6f86d36d286fd718e70 (diff)
downloadmarkdown-c56085ee71fd67567a3d08964f7d48a93abe7fbc.tar.gz
markdown-c56085ee71fd67567a3d08964f7d48a93abe7fbc.tar.bz2
markdown-c56085ee71fd67567a3d08964f7d48a93abe7fbc.zip
Fixed #77. util.isBlockLevel() needs to check entire tag passed to it.
-rw-r--r--markdown/postprocessors.py2
-rw-r--r--markdown/util.py4
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('"', '&quot;')
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