diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-07-19 21:18:18 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-07-19 21:18:18 -0400 |
commit | fbfa42dfafaa7b129c864cc359f9e6697887dab3 (patch) | |
tree | 2e169385c7380d2b3781f9553b975971bdbcc271 /markdown/extensions | |
parent | effa7a8aaace52b466fdd19ffd97e5e33e2a9a3a (diff) | |
download | markdown-fbfa42dfafaa7b129c864cc359f9e6697887dab3.tar.gz markdown-fbfa42dfafaa7b129c864cc359f9e6697887dab3.tar.bz2 markdown-fbfa42dfafaa7b129c864cc359f9e6697887dab3.zip |
Allow inline attr_lists at end of header.
A header can be only one line - so unlike other block level elements, a
attr_list must be at th eend of the line. To disingush it from an inline
attr_list on the last child in a header, we must require at least one
space before th eblock-level attrt_list.
Always intended it to work that way. Not sure how I missed that before.
At least we're testing for it now.
Diffstat (limited to 'markdown/extensions')
-rw-r--r-- | markdown/extensions/attr_list.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/extensions/attr_list.py b/markdown/extensions/attr_list.py index 161c448..3d7fc46 100644 --- a/markdown/extensions/attr_list.py +++ b/markdown/extensions/attr_list.py @@ -67,7 +67,7 @@ def isheader(elem): class AttrListTreeprocessor(Treeprocessor): BASE_RE = r'\{\:?([^\}]*)\}' - HEADER_RE = re.compile(r'[ ]*%s[ ]*$' % BASE_RE) + 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) NAME_RE = re.compile(r'[^A-Z_a-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02ff\u0370-\u037d' |