SGML

Markdown Definition List Examples

definition-list0
Basic definition list example, showing that definitions are treated like ordinary list items
definition-list1
Shows that definition lists can't be nested
definition-list2
Definition lists must have a definition term line
definition-list3
Multiple consecutive definition term/definition(s) pairs are formatted as multiple top-level HTML definition list elements rather than a single definition list having multiple definition term/definition(s) pairs
definition-list4 definition-list5
Definition terms must be on a single line of it's own
Note: To produce HTML from the example markdown sources, copy and paste an example source, store it into a file with the ".md" file extension, and invoke
sgmlproc <your-file.md>
where <your-file.md> is replaced by the actual file used for storing.

definition-list0

This is

:	just to check
:	if we can re-use

	list rules

for definition lists

Rendered HTML

<dl><dt>This is
</dt><dd>just to check
</dd><dd><p>if we can re-use
</p><p>list rules
</p></dd></dl><p>for definition lists
</p>

definition-list1

while markdown.awk's definition lists

-	are handled just as lists
	
	they can't be nested
	:	like
	:	this

Rendered HTML

<p>while markdown.awk's definition lists
</p><ul><li><p>are handled just as lists
</p><p>they can't be nested
:	like
:	this
</p></li></ul>

definition-list2

:	a definition without a definition term isn't formatted as dl

Rendered HTML

<p>:	a definition without a definition term isn't formatted as dl
</p>

definition-list3

multiple consecutive
:	definition term resp.
:	definition sequences

won't be placed

:	in the
:	same top-level definition list

:	but into

	a new one

Rendered HTML

<dl><dt>multiple consecutive
</dt><dd>definition term resp.
</dd><dd>definition sequences
</dd></dl><dl><dt>won't be placed
</dt><dd>in the
</dd><dd>same top-level definition list
</dd><dd><p>but into
</p><p>a new one
</p></dd></dl>

definition-list4

This shows that paragraphs with multiple lines
won't be treated as the defintion term in a definition list,
which is the same that pandoc (and possibly multimarkdown) does
on multi-line text followed by something looking like a definition
item.
:	This isn't a definition item.

Rendered HTML

<p>This shows that paragraphs with multiple lines
won't be treated as the defintion term in a definition list,
which is the same that pandoc (and possibly multimarkdown) does
on multi-line text followed by something looking like a definition
item.
:	This isn't a definition item.
</p>

definition-list5

The following is the same text as definitionlist4.txt, up to the
line containing "item", which is separated by a blank line here.

This shows that paragraphs with multiple lines
won't be treated as the defintion term in a definition list,
which is the same that pandoc (and possibly multimarkdown) does
on multi-line text followed by something looking like a definition

item.
:	This *is* treated as definition item.

Rendered HTML

<p>The following is the same text as definitionlist4.txt, up to the
line containing "item", which is separated by a blank line here.
</p><p>This shows that paragraphs with multiple lines
won't be treated as the defintion term in a definition list,
which is the same that pandoc (and possibly multimarkdown) does
on multi-line text followed by something looking like a definition
</p><dl><dt>item.
</dt><dd><p>This <em>is</em> treated as definition item.
</p></dd></dl>