[kramdown-users] Attributes on li elements

Shawn Van Ittersum svicalifornia at gmail.com
Mon Mar 15 16:49:01 EDT 2010


On Mon, 15 Mar 2010 21:27:09 +0100, Thomas Leitner wrote:
> On Tue, 16 Mar 2010 05:48:03 +1000, Shawn Van Ittersum wrote:
>> On Mon, 15 Mar 2010 20:11:12 +0100, Thomas Leitner wrote:
>>> When implementing list support in kramdown, I thought about how to
>>> add IAL support to list items but found no good way to to do it...
>>> so I didn't.
>> 
>> Why is this not a good way to do it?
>> 
>> * {li-attributes} List item...
> 
> Because the content of a list item are block level elements and this
> line would only qualify as paragraph and not as block IAL. To support
> this syntax, a new block level element that is only applicable in a
> list item, would need to be added.

Perhaps my suggestion is not clear.  I would like this:

  * {.high} Item 1
  * {.low} Item 2
  {.tasks}

to become this:

  <ul class="tasks">
    <li class="high">Item 1</li>
    <li class="low">Item 2</li>
  </ul>

The list item is itself a block-level element, and I'm requesting that  * {attribute} and 1. {attribute}  become the syntax for applying attributes to list item elements themselves (not some other block element inside).

Thanks,
Shawn



More information about the kramdown-users mailing list