attribute blocks for definition lists

Waylan Limberg waylan at
Fri Jul 19 22:03:59 EDT 2013

On Mon, Jul 1, 2013 at 11:33 AM, Matthieu Codron
<codronm+markdown at> wrote:


> the syntax would be


> term {#id}

> : definition


Python-Markdown already has extensions for Attribute Lists [1] and
Definition Lists [2] (both also available as part of Extra [3]).
However, due to the restriction that definition list terms can only be
on a single line (each line is a separate term), it was impossible to
assign attrs to the term. I was already special casing headers (h1-6)
for the same reason, so it wasn't too hard to adapt the code to work
with dt's also.

I just pushed a fix [4] which implements support for this syntax (you
can set any kind of attribute supported by the attr_list extension)
and it should be available in the next release of Python-Markdown
(probably 2.3.2). As always, testing/feedback is welcome.


\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg

More information about the Markdown-Discuss mailing list