Let's say I want to quote this shell code in a post:
foo=barecho $foo
First I put it in code fences so it shows up as code:
```foo=barecho $foo```
Then to quote it, I select it and either press the Quote button or Ctrl+Q, but the newlines get converted to spaces, destroying it:
> ``` foo=bar echo $foo ```
I would expect it to output this:
> ```> foo=bar> echo $foo> ```
Which renders as:
foo=barecho $foo
This also affects text in <pre>
tags, but not text indented by four spaces.
Workaround
Use <blockquote>
, though the start tag requires an extra newline, like this:
<blockquote>```foo=barecho $foo```</blockquote>
Which renders as:
foo=barecho $foo
Context
I noticed this while adding content to this answer and experienced the same problem while quoting the code in this question.