Re: list corner case
* [EMAIL PROTECTED] [EMAIL PROTECTED] [2008-09-09 07:45]: jacob said: This entirely contradicts Markdown's purpose and philosophy. and aristotle agreed: That is my opinion too. it _might_not_ (or might) be in alignment with the purpose and philosophy of markdown, but hey, it does not contradict it, _certainly_ not entirely. this is what gruber says under markdown philosophy: Markdown is intended to be as easy-to-read and easy-to-write as is feasible. Readability, however, is emphasized above all else. he continues: A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. if the intent is ambiguous -- and it _clearly_ is ambiguous, since no one here can state unequivocally what was meant, which is why there are competing interpretations at work -- then the document certainly will not be _readable_, let alone publishable as-is. so it's out of the realm of the philosophy. With due respect I have to say it seems to me you are utterly misinterpreting the second paragraph you quoted. My reading is that “publishable as-is” refers to it not “looking like it’s been marked up with tags or formatting instructions.” Simply put, all it says is that Markdown documents should not look like code – unlike HTML, which does. Furthermore, regardless of whether you are claiming that a document is readable or not, I know that as a human I have no trouble extracting some meaning from any of the examples given in this thread. Certainly if they contained real text, I would have even less trouble to understand what the author meant, based on contextual cues like, oh I dunno, *what the text says*. My interpretation of the Markdown philosophy is that plaintext documents have inherent meaning to humans, and the rules of the syntax should be designed to infer that meaning correctly. You’ll recall [1] that John’s motivation for designing Markdown was the tedium of the common tasks in writing HTML by hand – putting in tags for paragraphs, emphasis, quoting, etc. “It’s 2004. Shouldn’t your computer be able to determine where you’ve written paragraphs and sub-heads?” Obviously, the formatter should try its best to reflect the structure of the written prose with the appropriate means of HTML. Imagine that someone was nice enough to buy you a gift: an original typewritten manuscript for a classic novel. Let’s say Fitzgerald’s “The Great Gatsby”. You could sit down with this manuscript and read it, straight through, and get pretty much the same reading experience as you would when reading it in the form of a nicely bound and typeset book. Yes, it would all be set in the typewriter’s smudgy fixed-width Courier-esque typeface, with underlining instead of italics, etc. — but the words would still flow, from page to mind, just as Fitzgerald intended. Is there such a thing as an invalid classic novel? So how can there be such a thing as an invalid Markdown document? The quote from Stanley Kubrick I used to start this article is one of my very favorites. When you write and read text that’s marked-up with HTML tags, it’s forcing you to concentrate on the *think* of it. It’s the *feel* of it that I want Markdown-formatted text to convey. I can find no way to reconcile the above with your claim that ambiguous writer’s intent puts a source document outside the realm of Markdown’s philosophy of publishability. [1]: http://daringfireball.net/2004/03/dive_into_markdown Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/ ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: list corner case
Markdown syntax presents a strong pattern of using blank lines to separate elements. Does it? I hadn’t noticed. Good call, thank you; having concluded long ago that blank-line separation for block elements is it a good idea, I had forgotten that most implementations* were so lax about it. In any case, (b) still seems the most useful behaviour to me. * It seems ironic to follow the details of an informal and neglected implementation (i.e., Markdown.pl), rather than the spirit of the documentation. If you all want a formal (i.e., consistent) standard then you should define it yourselves because John Gruber is clearly not interested, and poring over the details of his implementation/documentation is not likely to yield one. ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: list corner case
Shorter version of my previous post: Gruber gives this example... 3. Bird 1. McHale 8. Parish ...and states that it will be numbered 1-2-3. Which is enough to make clear that in Markdown's design, the kind of goofy content in list- item markers that we're discussing is ignored. Simple. All this other talk strokes programmers' egos but doesn't result in more usable software. Read Alan Cooper's excellent book, The Inmates Are Running the Asylum; you'll see what I mean. ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
re: list corner case
waylan said: Actually, any method that returns results different than what the author expects will force the author to become less ambiguous. assuming they notice. if you put the results in some kind of indented block, they might not. (which is probably why this corner case hasn't been noticed before. it took some sleuthing for john to uncover different implementations.) if you leave it hanging there as a bare paragraph (i.e., do nothing) they're far more likely to notice that it wasn't formatted as intended, and that's likely to get them to ask themselves what they'd intended... (markdown didn't seem to know what i wanted; oh, i was too vague.) but at any rate, what you've made here is a good point, so i feel i can make good on my intention to opt out of this thread from now on... -bowerbird ** Pt...Have you heard the news? There's a new fashion blog, plus the latest fall trends and hair styles at StyleList.com. (http://www.stylelist.com/trends?ncid=aolsty000514) ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: list corner case
It has been interesting to hear people's thoughts on this. Let me summarize the considerations I've been weighing. Against (b): it's just too unexpected. Nothing in the markdown syntax description would lead one to expect that changing the list marker would start a sublist. I'm curious, though, to hear whether Michel Fortin has a rationale for doing it this way in PHP Markdown; I think he's the only (b)-category implementer who hasn't weighed in on this discussion. One argument for (c) that initially appealed to me is that it allows the writer to have two consecutive lists without any intervening block element--something that is otherwise impossible in markdown. So it adds expressive power, whereas (a) just gives you another (more obscure) way to express something you can already express. The more I thought about it, though, the less impressive I found this consideration. For (c) only gives you a way to have consecutive lists if one is ordered and one unordered. It doesn't help if you want to have two consecutive ordered lists, e.g.: 1. foo 2. bar 1. baz 2. quux This gets parsed as one big ordered list by all implementations. It seems to me that if markdown needs a way to express consecutive lists, it needs a *general* way to do so, one that will work even if the lists are of the same type. Another argument for (c) is that John Gruber's markdown syntax description gives the definite impression that ALL the markers in an ordered list are numbers, and that ALL the markers in an unordered list are *, +, or -. Unordered lists use asterisks, pluses, and hyphens — interchangably — as list markers... Ordered lists use numbers followed by periods... Gruber does say that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces, but note that he says numbers here; there is no suggestion that you can use bullet markers in an ordered list. On this ground it might be argued that (a) would not be the expected interpretation. On the other hand, (a) is the most well-established interpretation, since it's the interpretation of Markdown.pl and all the implementations that have essentially copied its regular expression transformations. I know there's markdown out there that continues ordered lists with unordered list markers (I found one instance of this when I replaced BlueCloth with rpeg-markdown and someone complained that his lists had changed). I've also seen at least one markdown cheat-sheet that advertises this behavior http://greg.vario.us/doc/markdown.txt. So even though I think (c) is a slightly better interpretation of the markdown syntax document, I'm inclined to defer to the canonical implementation here, in the interest of not breaking existing documents. That means that, even though my two implementations fall into groups (b) and (c), I'm starting to favor (a). John +++ John MacFarlane [Sep 07 08 18:24 ]: I'm curious how people think the following *should* be interpreted: - one 2. two http://babelmark.bobtfish.net/?markdown=-++one%0D%0A2.+two%0D%0A%0D%0A As you can see, implementations split into three groups here: (a) treat as an unordered list Markdown.pl, Python markdown, MultiMarkdown, BlueCloth, MarkdownJ, Showdown (b) treat as an unordered list with an ordered sublist PHP Markdown, Text::Markdown, Pandoc (c) treat as an unordered list followed by an ordered list Maruku, Discount, PEG Markdown John ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss
Re: list corner case
I'll admit the interpretation of 1. foo * baz - bar - biff * qix - qak 7. qux as a single list counter intuitive. My gut feel for that, after having used markdown.pl with ttree for a few months is that this would be a three level nested list. I KNOW that's not what the docs say. But the philosophy of markdown is that of an email message. Who changes bullets in the middle of a list? And since indents in email are normally used for quoting, I expect the above to be shorthand for 1. foo * baz - bar - biff * qix - qak 2. qux ___ Markdown-Discuss mailing list Markdown-Discuss@six.pairlist.net http://six.pairlist.net/mailman/listinfo/markdown-discuss