spaces and newlines before list markers (was: evolving the spec)

Thomas Nichols nichols7 at googlemail.com
Sat Mar 1 02:46:45 EST 2008



Waylan Limberg wrote on 2008/03/01 6:12:

> Hmm, I don't remember reading that before. Was it always there?

>


Not sure. Been there for a cuple of years at least, I think.


> Anyway, to be honest this has been the hardest thing about markdown

> for me to wrap my head around (and probably why I picked it as an

> example in the other discussion). The way I always understood it,

> indenting in Markdown is done in increments of 4. Therefore, in my

> mind, the only amounts of indent allowed should be 0, 4, 8, 12, 16,

> ... and so on. It would never even occur to me to use any other

> amounts of indent for any reason - ever. And, in fact, I had never

> tried it until someone brought it up here on the list. With the

> exception of the "it makes copy and pasting easier" argument, I'll

> probably never understand it. Thats just the way my mind works.

> Nothing against those who think differently.

>


I use increments of two - but the same principle applies I think. Using
~ for spaces for clarity:

~~1. Item One
~~~~a. One A
~~~~b. One B
~~2. Item Two
...

... and unsurprisingly some (maybe all) of the Markdown implementations
I use have a fit about this -- they interpret the 4 space indent as
implying a <pre><code>block. In this context, though, I think a human
would see immediately what is intended. Perhaps M-Spec parts 1 or 2
could as well?


> And, in fact, reading Gruber's "Dive into Markdown" it would seem

> reasonable that one could conceivably take any well crafted email and

> run it through a markdown parser and get some decent html. Obviously,

> in practice things don't work so well. In the end consesions have to

> be made on both sides. I won't enforce my restrictive view of

> indentation on the community at large, and perhaps those who like to

> indent secondary lines of list items will need to watch their line

> breaks to avoid errant list items.

>


Sounds good to me :-)

> We could always require a blank line between list items, but consider

> this list of one-word items:

>

> * red

> * blue

> * green

>

> Do we really want to require the author to add a blank line between

> each item? I don't.

>


Nor me - I agree, compact lists like this are much best without blank
lines. When list items require more than one line (in whatever tool I'm
using to edit at the time) it can make sense to insert blank lines. To
me, at least...

-- Thomas





More information about the Markdown-Discuss mailing list