ticket id
000036
status
closed
priority
???
assigned to
NOBODY
Reported by: aresnick
Component:

markdown doesn't seem to handle the {@attr=val} syntax for unordered lists, instead either preventing "+" from being parsed as a list element, or simply creating a <p attr=val>. I can get it to work for list elements (that is, + {@class="foo"} behaves as expected).

In [1]: from markdown import markdown as md

In [2]: md('+ foo')
Out[2]: u'<ul>\n<li>foo</li>\n</ul>'

In [3]: md('+ {@class="foo"} foo')
Out[3]: u'<ul>\n<li class="&quot;foo&quot;"> foo</li>\n</ul>'

In [4]: md('\n{@class="foo"}\n+ foo')
Out[4]: u'<p class="&quot;foo&quot;">\n+ foo</p>'

In [5]: md('\n{@class="foo"}+ foo')
Out[5]: u'<p class="&quot;foo&quot;">+ foo</p>'

In [6]: md('\n{@class="foo"}\n\n+ foo')
Out[6]: u'<p class="&quot;foo&quot;" />\n<ul>\n<li>foo</li>\n</ul>'

In [7]: md('{@class="foo"}\n\n+ foo')
Out[7]: u'<p class="&quot;foo&quot;" />\n<ul>\n<li>foo</li>\n</ul>'

Comments:

By Waylan on June 24, 2009 Thanks for the report. However, I'm setting this as "wontfix". First of all, Python-Markdown is the only implementation of Markdown that even supports setting the class on list items. Second, it's not an official part of markdown for any part of the syntax. Third, Python-Markdown has never supported or tried to support this. Fourth, it's not clear how this would be declared differently from setting the class on the list item in a way that is easily understood by both the reader and writer of the source text.

Resolution

wontfix

Powered by Sputnik | XHTML 1.1