Spec
appsynergy — 2014-09-04T08:20:39-04:00 — #1
Not commonly found in most implementations afaik, though I quite like the semantics and it provides an opportunity for yet-another list format..
Any imps that do use <dd>
, <dl>
etc?
Or any particular reason they've been avoided?
gioele — 2014-09-04T09:40:10-04:00 — #2
Description lists are already implemented by many processors. It would be nice to see them featured in standard markdown.
Python-Markdown, Kramdown, Maruku, php-markdown/extra and pandoc all use the following syntax
topic
: description 1
: description 2
Kramdown allows multiple topics
topic 1
topic 2
: description
> with nested markup
Pandoc raises an interesting point about lazy wrappings:
To see why laziness is incompatible with relaxing the requirement of a blank line between items, consider the following example:
bar
: definition
foo
: definition
Is this a single list item with two definitions of “bar,” the first of which is lazily wrapped, or two list items? To remove the ambiguity we must either disallow lazy wrapping or require a blank line between list items.
The nice thing about this syntax for definition lists is that processors that do not understand it natively will produce a single paragraph with a colon in the middle:
<p>topic : description</p>
jks — 2014-09-04T11:51:44-04:00 — #3
Just wanted to point out that parsing multiple topics is not easy without backtracking. Consider this example:
term1
term2
...
term999
: definition
In the above case a parser needs to consume 999 lines to detect a definition list. While in this case:
term1
term2
...
term999
next paragraph
the parser consumed 999 lines and detected that there is no definition list and it needs to backtrack and reparse the whole block element as something else (possibly a plain text paragraph).
AFAIK Pandoc also requires that a definition line is indented four spaces. Such as:
term1
:···definition
because otherwise it is all too easy to make an unintended definition list.
gioele — 2014-09-06T10:22:32-04:00 — #4
There seems to be a wide agreement on how description lists should be represented.
What is the next towards the recognizion of this established syntax in CommonMarkdown?