when rational discussion was still a possibility

John MacFarlane jgm at berkeley.edu
Sun Sep 7 01:19:07 EDT 2014


+++ Michel Fortin [Sep 06 14 23:39 ]:

>John Gruber thought otherwise ten years ago. He decided that at the root of the document it'd take a black line, but when making a sublist inside a list item it'd not require one. Also, lists with sublists like your last example won't create a `<p>` in the outer list item so it's not really the same thing.

They really are the same, as far as our parser is concerned.  Paragraph
followed by a tight unordered list with two items.  The stripping of `<p>`
tags off tight lists happens in the HTML writer.  (A LaTeX writer, for example,
would need to do something entirely differently to create a compact
list.)

>I did propose this rule back in 2004 which would solve the cases above. Here's a few archived posts:
>http://six.pairlist.net/pipermail/markdown-discuss/2004-March/000232.html
>http://six.pairlist.net/pipermail/markdown-discuss/2004-March/000241.html
>http://six.pairlist.net/pipermail/markdown-discuss/2004-March/000318.html

Interesting.  I think your proposal was clever, but I agree that it's
not robust enough.  I also don't like J.G.'s proposed fix, because the
the way it makes list and non-list content non-uniform.


>>> https://github.com/michelf/mdtest/blob/master/Markdown.mdtest/Literal%20quotes%20in%20titles.text
>>
>> See here http://jgm.github.io/stmd/spec.html#link-title
>> and particularly the paragraph:
>>
>> "(Note: Markdown.pl did allow double quotes inside a double-quoted title, and
>> its test suite included a test demonstrating this. But it is hard to see a good
>> rationale for the extra complexity this brings, since there are already many
>> ways--backslash escaping, entities, or using a different quote type for the
>> enclosing title--to write titles containing double quotes. Markdown.pl’s
>> handling of titles has a number of other strange features. For example, it
>> allows single-quoted titles in inline links, but not reference links. And, in
>> reference links but not inline links, it allows a title to begin with " and end
>> with ). Markdown.pl 1.0.1 even allows titles with no closing quotation mark,
>> though 1.0.2b8 does not. It seems preferable to adopt a simple, rational rule
>> that works the same way in inline links and link reference definitions.)"
>
>There sure is room for more consistency with various quote styles and disallowing non-sensial combinations of `"` and `)`. But take note:
>
>1. stmd is the only implementation not supporting unescaped quotes. http://johnmacfarlane.net/babelmark2/?normalize=1&text=Foo+%5Bbar%5D(%2Furl%2F+%22Title+with+%22quotes%22+inside%22).
>
>2. neither Markdown.pl, PHP Markdown, nor many other parsers let you escape a double quote (or a single quote), so the obvious solution is unfortunately non-portable and you'll have to recommend using `"`. http://johnmacfarlane.net/babelmark2/?normalize=1&text=%5C%22quotes%5C%22

It seems to me that the backslash-escapes *should* work in these
contexts.  There's no clear reason why they should be disallowed; they are
clearly useful; and the syntax description never says that they don't work in
these contexts.

Allowing them to work removes 50% of the motivation for allowing
nested quotes.  Allowing you to use other quote types for titles
across the board (' or ()) removes another 25%.  Or so I reasoned,
anyway.

There is a backwards-compatibility concern, which is serious, though
I'll bet the cases affected are very rare.

This is an issue that we might want to reconsider.

>The problem seems to be that this file for some reason uses classic Mac OS line endings (CR), but the browser corrects that automatically when pasting it in Babelmark 2 so you get a correct result there.

Didn't realize anyone still used these.  We'll have to allow them, I
suppose!



More information about the Markdown-Discuss mailing list