Paragraphs and Line Breaks

A. Pagaltzis pagaltzis at gmx.de
Mon Jul 4 15:05:36 EDT 2005


* Angie Ahl <alists at vertebrate.co.uk> [2005-07-04 19:45]:

> Not really. I'm trying to work out why the double space is

> needed as the Markup code already treats 2 return as the end of

> a para so I can't see why the double space is required.


It is needed because HTML is not supposed to be hard-wrapped.
You want to preserve paragraph breaks when converting mail to
HTML, but you want to make themselves paragraphs rewrappable.
That’s why single breaks are treated as whitespace, while double
breaks are considered significiant.

If you really want to treat every single linebreak as a `<br />`,
it’s not that hard to run a `s/$/ /` over the input first,
either.

What annoys me is that Markdown only discards one of those two
spaces, so ` \n` actually translates to ` <br />\n` instead of
just `<br />\n`.

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


More information about the Markdown-Discuss mailing list