Definition lists

Michel Fortin michel.fortin at michelf.com
Wed Jul 27 08:10:38 EDT 2005


Le 26 juil. 2005, à 13:59, A. Pagaltzis a écrit :


> It’s possible to have both if you require an empty line only

> after a lazily indented definition, eg.

>

> Apple

> : Pomaceous fruit of plants of the genus Malus in

> the family Rosaceae.

>

> : An american computer company.

> Orange

> : The fruit of an evergreen tree of the genus Citrus.

>

> 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.


Le 27 juil. 2005, à 4:41, Bowerbird at aol.com a écrit :


> i think you should require indentation _and_ blank lines! :+)

> that way the stuff looks very clean even in its ascii form.


The point is that Markdown already allow lazy indentation for lists and
blockquotes and I'm not sure it is a good idea to break with that.

What I have in mind right now is the mandatory blank line before each
definition, which would give this:

Term
: Definition
: Definition

Term
: Definition

Term
: Definition

This somewhat break with default HTML rendering of the browsers, which
do not put that much space between a definition and the following term.
It also add one line to each term which is a lot of space when you have
many terms with small one-line definitions. But I feel this is the best
compromise.

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


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/


More information about the Markdown-Discuss mailing list