diff options
-rw-r--r-- | markdown/extensions/attr_list.py | 2 | ||||
-rw-r--r-- | tests/extensions/attr_list.html | 4 | ||||
-rw-r--r-- | tests/extensions/attr_list.txt | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/markdown/extensions/attr_list.py b/markdown/extensions/attr_list.py index 683bdf8..de39944 100644 --- a/markdown/extensions/attr_list.py +++ b/markdown/extensions/attr_list.py @@ -72,7 +72,7 @@ def isheader(elem): class AttrListTreeprocessor(Treeprocessor): - BASE_RE = r'\{\:?([^\}]*)\}' + BASE_RE = r'\{\:?([^\}\n]*)\}' HEADER_RE = re.compile(r'[ ]+%s[ ]*$' % BASE_RE) BLOCK_RE = re.compile(r'\n[ ]*%s[ ]*$' % BASE_RE) INLINE_RE = re.compile(r'^%s' % BASE_RE) diff --git a/tests/extensions/attr_list.html b/tests/extensions/attr_list.html index 2a36dbc..93a862f 100644 --- a/tests/extensions/attr_list.html +++ b/tests/extensions/attr_list.html @@ -63,4 +63,6 @@ And a <strong class="nest">nested <a class="linky2" href="http://example.com" ti <p>Value without <em>key</em></p> <p>No <em>key or value</em></p> <p><em>Weirdness</em></p> -<p><em>More weirdness</em></p>
\ No newline at end of file +<p><em>More weirdness</em></p> +<p>Attr_lists do not contain <em>newlines</em>{ foo=bar +key=value }</p>
\ No newline at end of file diff --git a/tests/extensions/attr_list.txt b/tests/extensions/attr_list.txt index c2adbf4..603b611 100644 --- a/tests/extensions/attr_list.txt +++ b/tests/extensions/attr_list.txt @@ -88,3 +88,5 @@ No *key or value*{ = } *More weirdness*{ === } +Attr_lists do not contain *newlines*{ foo=bar +key=value } |