diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-07-19 21:39:14 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-07-19 21:39:14 -0400 |
commit | a9ca97325e9039de90eae29fb3d8879bc9f367f6 (patch) | |
tree | 4e7ec47a4f22317a85dea572e6e5d76f9d7bfafe /markdown/extensions | |
parent | fbfa42dfafaa7b129c864cc359f9e6697887dab3 (diff) | |
download | python-markdown-baserock/morph.tar.gz |
Added support for attr_lists on definition list terms.baserock/morph
Like headers (h1-6) dt's can only be on one line, so we need to use
the header regex on dt's. This was implemented after considering a recent
[discussion](http://six.pairlist.net/pipermail/markdown-discuss/2013-July/002859.html)
on the markdown mailing list. Prior to that discussion, I never considered
that it was impossable to set block level attrs on dt's. Now it is.
Diffstat (limited to 'markdown/extensions')
-rw-r--r-- | markdown/extensions/attr_list.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/markdown/extensions/attr_list.py b/markdown/extensions/attr_list.py index 3d7fc46..2175691 100644 --- a/markdown/extensions/attr_list.py +++ b/markdown/extensions/attr_list.py @@ -80,8 +80,8 @@ class AttrListTreeprocessor(Treeprocessor): if isBlockLevel(elem.tag): # Block level: check for attrs on last line of text RE = self.BLOCK_RE - if isheader(elem): - # header: check for attrs at end of line + if isheader(elem) or elem.tag == 'dt': + # header or def-term: check for attrs at end of line RE = self.HEADER_RE if len(elem) and elem.tag == 'li': # special case list items. children may include a ul or ol. |