# Stop inserting hard line-wraps in blockquotes!

When you use the markdown editor's blockquote feature (the quote button / Ctrl+Q), it inserts hard line-wraps in the markdown source automatically for you. That is, it transforms text like this:

Hindus regard it as an earthly manifestation of the goddess Tulsi, a consort of the god Vishnu.

The offering of its leaves is mandatory in ritualistic worship of Vishnu and his forms like Krishna and Vithoba.


Into text like this:

> Hindus regard it as an earthly manifestation of the goddess Tulsi, a
> consort of the god Vishnu.
>
> The offering of its leaves is mandatory in ritualistic worship of
> Vishnu and his forms like Krishna and Vithoba.


The editor should instead transform it into this:

> Hindus regard it as an earthly manifestation of the goddess Tulsi, a consort of the god Vishnu.
>
> The offering of its leaves is mandatory in ritualistic worship of Vishnu and his forms like Krishna and Vithoba.


That is, without adding any newlines.

Why on earth does it insert hard line-wraps!? Both these forms look the same when rendered, but the current way makes it more difficult for us to go back and edit the blockquoted text later if need be.

This is particularly objectionable functionality for sites that use MathJax - while the hard line-wraps don't impact the rendered output, the additional > that are inserted do (they manifest as greater-than signs if they get inserted within MathJax $$...$$). See this post on Meta.Math.SE for more details: http://meta.math.stackexchange.com/q/21140/.

I found an explanation that this behavior is apparently :

The "reflow the text when you click blockquote" is a deliberate feature, intended to improve the readability on quoted text.

Seriously? Are there any browsers that don't soft-linewrap textareas anymore? How is hard-wrapping at 70(?) characters better than soft-wrapping at \$textareawidth? If readability is the concern here, then why not hard-wrap all non-code upon post submission?

• At first I thought you were talking about the eventual display of the quoted text, and I don't agree with that. But then I realized you were talking about what the editor does to the source... and I agree completely with you there. – Andrew Barber Jun 19 '14 at 20:03
• I can't tell you how many times that's munged up quotes for me. – Adam Davis Jun 19 '14 at 20:30
• I always end up typing the > manually to get around this. It would be such a simple fix! – mhlester Jun 19 '14 at 20:40
• I think they mean the readability of the source. The > in front of each line makes it easier to see where the quote ends, especially for longer quotes. – derobert Jun 20 '14 at 8:00
• @derobert Okay, I kind of see where you're coming from with that, but only kind of. It's not any harder to find the end of a quote than it is to find the end of a non-quote paragraph in markdown, so again, the question is: why the special treatment for blockquotes? – senshin Jun 20 '14 at 8:02
• Another factor is reading a diff (if something in the quote is edited/corrected) on a 1000 char line is a lot harder than reading a diff on a 80 char part of it. – AD7six Jun 20 '14 at 8:04
• @AD7six But the diffs also line-wrap (and diffs on SE are done at the word level, not at the line level). And again, this doesn't explain special treatment for quotes. – senshin Jun 20 '14 at 8:05
• @senshin point conceeded =). – AD7six Jun 20 '14 at 8:10
• As seen here these insertions may alter the meaning of the block quoted text, when the insertion takes place inside a piece of MathJax code (when the MathJax interpreter will treat as a "greater than" character. – Jyrki Lahtonen Aug 5 '15 at 18:12
• This should on Stack Overflow also solve the problem of inability to reformat exception stack traces back into a code block when the poster formatted them in a quote block. So, definitely a big plus form me. – BalusC Aug 5 '15 at 20:48