Definition lists

A. Pagaltzis pagaltzis at gmx.de
Wed Jul 27 10:33:42 EDT 2005


* Michel Fortin <michel.fortin at michelf.com> [2005-07-27 14:20]:

> >The rule is: a line starting a definition, followed only by

> >lines which don’t start a defition, followed by an empty line,

> >is a single definition of the previous term. This is

> >unambiguous.

>

> Nice, but now how do you make the difference between

> definitions that should be wrapped in paragraphs and those that

> should not? Currently, PHP Markdown Extra check for a blank

> line above the definition.


A possibility would be to check whether the term is followed by a
blank line. If so, then all definitions would be wrapped in
paragraphs. And if a definition has an internal blank line, it’s
obvious.

That doesn’t allow you the flexibility of wrapping only some
defintions, but not others, when you are using lazy indenting,
but you can only infer so much meaning from one character and a
little whitespace.


> Another way would be to add an unambiguous term marker, but

> this would probably lead to too much markup characters and I

> have no idea what to use for such marker. Here is an (ugly)

> example:

>

> ~Term

> : Definition

> : Definition

> ~Term

> : Definition

> ~Term

> : Definition


A terminating marker for the term would be more natural. How
about a double colon?

Some term::
And some definition for it.
:: An alternative definition, this
one with lazy indenting.
:: Another, still for the same
term, with an indented marker.
This is the next term::
It has a different definition.
Add more terms::
To your heart’s content.

Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>


More information about the Markdown-Discuss mailing list