Markdown quote requires blank line to end quote

markdown
markdown-it-review

(Geoff Bowers) #1

Markdown quote requires blank line to end quote.

>
> hello cruel world
>
Least hated favourite fish.

Formats to:

hello cruel world

Least hated favourite fish.

But would have expected:

hello cruel world

Least hated favourite fish.

Has a knock on effect for inline emails.

It looks like GMail and very likely other HTML email clients format the text version of a quote with an inline response in exactly this way. For example, what appears to be an inline response in an email client gets formatted like so:

>
> quoted text from email has quote marker above and below
>
inline response appears directly below

The latter is one of several “issues” I’m getting hauled over the coals for in our Google Groups migration, as this often leads to the entire inline response being formatted incorrectly or in some instances hidden completely.


(Jeff Atwood) #2

Not in fact a bug, but one of the “fun” features of Markdown. Try it yourself:

Babelmark 2 - Compare markdown implementations.

Let’s count…

  • 21 implementations call that correct
  • 5 do not (including commonmark for the record)

Looks like a minority report to me.


(Geoff Bowers) #3

Soooo… Does Discourse plan to use the CommonMark flavour of Markdown any time soon, or are we stuck with the current formatting interpretation?

If we’re stuck with the current formatting should I raise a separate bug/feature for the email parsing issue? The latter being my real problem here :wink:


(Daniel Tobias) #4

I’ve always had a pet peeve against email repliers who put angle-brackets before the blank line separating their quote from their reply like above; it just looks so awkward to me compared to having a true blank line:

> quoted text

reply

…and various mail programs will sometimes reformat the block poorly, not just like the Markdown misfeature this thread is about, but also sometimes re-wrapping the whole thing, quote and reply, into one paragraph.

Maybe the author of Markdown was similarly peevy and made that system penalize such quoting behavior?


(Fletcher Tomalty) #5

The faster every major site moves to CommonMark over Markdown, the less of this insane behaviour all of us users have to deal with on a daily basis. Is there any reason not to for Discourse?


(Jeff Atwood) #6

The spec isn’t done. Feel free to help at http://www.commonmark.org


(Sam Saffron) #7

The behavior of:

This is a quote

and line directly below

Is now accepted by the spec:

> This is a quote
>
and line directly below

Time to celebrate with some :dolphin: :dancer:


(Sam Saffron) #8