Quote tags turning into code tags

I’ve seen this before, but since it just cropped up again, I’m asking about it now. Sometimes, the board will take quote tags in a post, and instead of formatting them like quotes, will format them like codes: Monotype font, with no text wrapping except at explicit newlines (so the quote becomes very wide, with a scroll bar on the box). Most recently, I saw it in @CalMeacham 's post here:

And yes, I double-checked, and the tags in the post are actually quote, not code.

What causes this, and how can we fix it?

I’ve seen it before, it was the 5 leading spaces of first paragraph.

Remove the spaces and you get a quote.

Does Discourse even employ QA people, @codinghorror ?

This is a trivial bug, with a well over-complicated solution.

How about… just allow multiple spaces at the start of a quote tag? I mean, it takes work and logic to swap out a quote with a code section.

Or just trim it. Really. Javascript is not hard, Jeff.

It’s not a bug. Four (or more) spaces before a line is the standard way to indicate a code block in Markdown.

The quote boxes aren’t actually turning into code blocks. They are both a quote block and code block combined.

It is a bug.

I’d argue that markdown itself is a bug, but unfortunately it is now ubiquitous.

Either a quote is a quote, or a code block is a code block. They should not be considered the same thing, unless the quote is quoting a code block, in which case the tags should be nested, and clearly marked as such.

That there even is a way to mark a codeblock in Markdown is, I would argue, a bug. The point of Markdown is supposed to be that it’s a way to intuitively format text for people who aren’t comfortable with coding. But the point of marking sections of text as code is for people who are comfortable with coding.

And further, even aside from that, multiple spaces at the start of a paragraph is, in many contexts, the standard way to mark something as a paragraph. It therefore should never be used as the standard way to mark anything other than a paragraph.

And then, of course, many computer languages are whitespace-sensitive. If one wishes to present code in, say, Fortran77, one cannot do so by prefacing it with superfluous spaces.

Moderator Note

Do not attack Discourse, @codinghorror, or their staff.

Actually, it’s not. As far as I can tell, it is working exactly as it is documented to work.

I don’t like it either, but that doesn’t make it a bug.

I should also point out that Discourse is open-source software. If it bothers you that much, the code is available. Feel free to fix it yourself. I don’t know exactly how Discourse’s approval system works, but I do know that they do accept code fixes from other folks. That’s kind of the point of it being open-source.