kivikakk / comrak

CommonMark + GFM compatible Markdown parser and renderer

Home Page:https://hrzn.ee/kivikakk/comrak

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description lists with tight and loose syntax

digitalmoksha opened this issue · comments

What do you think about supporting the tight and loose syntax as laid out by jgm in https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md?

This follows the style of lists in general, where a tight list doesn't wrap the content in a paragraph, and the loose list does. So this would be valid

one
: two
: three

and generate this

<dl>
<dt>one</dt>
<dd>two
</dd>
<dd>three
</dd>
</dl>

and this would be valid

one

: two

: three

and generate this

<dl>
<dt>one</dt>
<dd>
<p>two</p>
</dd>
<dd>
<p>three</p>
</dd>
</dl>

I think what is there currently is mostly a subset of that spec. The spec adds a tight list (no blank line necessary), support for ~ as a marker, and allows for multiple definitions for each term.