# Markdown quote requires blank line to end quote

**URL:** https://meta.discourse.org/t/markdown-quote-requires-blank-line-to-end-quote/24705
**Category:** Bug
**Tags:** markdown-it-review, markdown
**Created:** [February 2, 2015, 6:51am UTC](https://meta.discourse.org/t/markdown-quote-requires-blank-line-to-end-quote/24705 "2015-02-02T06:51:20Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![modius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/modius/32/108600_2.png) [@modius](https://meta.discourse.org/u/modius)
#### Post date: [February 2, 2015, 6:51am UTC](https://meta.discourse.org/t/markdown-quote-requires-blank-line-to-end-quote/24705/1 "2015-02-02T06:51:20Z")

</div>

Markdown quote requires blank line to end quote.

```plaintext
>
> 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:

```plaintext
>
> 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](https://meta.discourse.org/t/migrating-from-google-groups/24695), as this often leads to the entire inline response being formatted incorrectly or in some instances hidden completely.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 2, 2015, 9:31am UTC](https://meta.discourse.org/t/markdown-quote-requires-blank-line-to-end-quote/24705/2 "2015-02-02T09:31:48Z")

</div>

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

[John MacFarlane - babelmark 2](http://johnmacfarlane.net/babelmark2/?normalize=1&text=%3E%0A%3E+hello+cruel+world%0A%3E%0ALeast+hated+favourite+fish).

Let’s count…

- **21** implementations call that correct
- **5** do not (including [commonmark](http://commonmark.org/) for the record)

Looks like a minority report to me.

![](https://global.discourse-cdn.com/meta/original/3X/9/e/9e9916bf41916f00481999985ec55cbecc965a40.jpg)

---

<div class="post-metadata">

### Author: ![modius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/modius/32/108600_2.png) [@modius](https://meta.discourse.org/u/modius)
#### Post date: [February 2, 2015, 10:22am UTC](https://meta.discourse.org/t/markdown-quote-requires-blank-line-to-end-quote/24705/3 "2015-02-02T10:22:55Z")

</div>

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 😉

---

<div class="post-metadata">

### Author: ![Dan\_Tobias](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dan_tobias/32/61591_2.png) [@Dan\_Tobias](https://meta.discourse.org/u/Dan_Tobias)
#### Post date: [February 2, 2015, 1:36pm UTC](https://meta.discourse.org/t/markdown-quote-requires-blank-line-to-end-quote/24705/4 "2015-02-02T13:36:53Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![fletom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fletom/32/115574_2.png) [@fletom](https://meta.discourse.org/u/fletom)
#### Post date: [February 2, 2015, 1:48pm UTC](https://meta.discourse.org/t/markdown-quote-requires-blank-line-to-end-quote/24705/5 "2015-02-02T13:48:21Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 3, 2015, 12:03am UTC](https://meta.discourse.org/t/markdown-quote-requires-blank-line-to-end-quote/24705/6 "2015-02-03T00:03:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [June 26, 2017, 2:21pm UTC](https://meta.discourse.org/t/markdown-quote-requires-blank-line-to-end-quote/24705/7 "2017-06-26T14:21:23Z")

</div>

The behavior of:

> This is a quote

and line directly below

Is now accepted by the spec:

```plaintext
> This is a quote
>
and line directly below

```

Time to celebrate with some 🐬 💃

> [@CommonMark testing started here!](https://meta.discourse.org/t/commonmark-testing-started-here/65121):
>
> Per our [migration plans](https://meta.discourse.org/t/discourse-commonmark-migration-plans-confetti-ball-balloon), I just enabled [markdown.it](https://github.com/markdown-it/markdown-it) at Meta. It is an excellent [CommonMark](http://commonmark.org/) compliant engine. I expect quite a few edges to be found during this period of testing. Do not open bugs about the new Engine, just reply here. I/we will be updating the top post here with the list of issues and striking out stuff as it is fixed. Current known issues (to be fixed)white_check_mark Onebox vanishes after you start typing and works not-super consistently white_check_mark pending…

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [June 26, 2017, 2:21pm UTC](https://meta.discourse.org/t/markdown-quote-requires-blank-line-to-end-quote/24705/8 "2017-06-26T14:21:28Z")

</div>


