summaryrefslogtreecommitdiff
path: root/markdown/extensions
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2013-07-19 21:39:14 -0400
committerWaylan Limberg <waylan@gmail.com>2013-07-19 21:39:14 -0400
commita9ca97325e9039de90eae29fb3d8879bc9f367f6 (patch)
tree4e7ec47a4f22317a85dea572e6e5d76f9d7bfafe /markdown/extensions
parentfbfa42dfafaa7b129c864cc359f9e6697887dab3 (diff)
downloadpython-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.py4
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.