on the philosophical aspects of a specification

Seumas Mac Uilleachan seumas at idirect.ca
Wed Mar 5 10:25:05 EST 2008


Michel Fortin wrote:

> Le 2008-03-04 à 21:47, Seumas Mac Uilleachan a écrit :

>

>> david parsons wrote:

>>

>>> And how about _________cut here_________ ?

>>>

>> This is a problem. Anything more than 4 _ per side does not render

>> but with 4 it does (in PHP) if you have ____cut here____ are you

>> expecting it to be converted to <em><strong><em>cut

>> here</em></strong></em> ?

>

> Well, that's already much better than what you get from Markdown.pl.

> :-) But I agree it could still benefit from some improvement.

>

>> [...]

>>

>> And speaking of ambiguous

>>

>> * List

>> * List

>> * List

>> * List

>> * List

>> * List

>> * List

>> * List

>

> Yeah, the list implementation in Markdown.pl and PHP Markdown doesn't

> follow the at all the little of a spec we have now. I've been thinking

> about rewriting the list parser in PHP Markdown, but I'm wondering

> what to do to not suddenly change a myriad of documents which may

> depends on some part of this behaviour, such as:

>

> * item

> * subitem

> * subitem

> * item

> * subitem

>

> (Here, no item is indented by four space, should this be a flat list?)

We have to decide what the intent is - if indents are two spaces or more
that indicates sublists, where one space indicates a mistake in typing?
What if the mistake results in your sublist item becoming an upper list
item (space one instead of two)? Lists in general need to be more
precisely defined. I for one would like to see the ability for arbitrary
starting points in numbered lists added. Then again, how many existing
documents will that break?

>

> I know people have written lists like the above in their document.

> They did it because it produce what they expect in their Markdown

> implementation, because the thing is readable and make sense, and

> because didn't bother to read the spec.

>

>> What was the intent here? I would suggest more like

>>

>> * List

>> * List

>> * List

>> o List

>> * List

>> * List

>> * List o List

>>

>> Since only the 4th and 8th are indented 4 spaces.

>

> Eh, I don't see a four space indent anywhere in your example. But,

> assuming your output got screwed up while editing and that the last

> list element belongs on a separate line, I agree with you that it's

> probably the best possible output to represent the author's intent.

>

Um, looks like first space got chopped off all the lines. Indents were
3,2,3,4,3,2,3,4. I was trying to show what happens if you aren't exactly
precise on your spacing. I personally always start my lists with zero
spaces when typing but when cutting and pasting lists I can end up with
1,2,3, as much as six spaces in front (obviously with six I do need to
revise but otherwise I just leave as is). If someone habitually uses two
but at one point mistakenly types one or three instead - the intent was
two but how should Markdown handle that? Currently (which is strange)
the first line in my example has three spaces and is a first level list.
The next line has only two but becomes a **second level** list.

>

> Michel Fortin

> michel.fortin at michelf.com

> http://michelf.com/

>

>

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss

>

>




More information about the Markdown-Discuss mailing list