Often, I embed code snippets from other sites as actual block quotes (together with their explanation).
Expected result
Let's take this absolutely nonsense example. I want to see this output:
If you want to append a file to another, and do other stuff, use
cat
:cat one_file > other_file; with a really long command after that; blah yada foo;
Actual result
However, if you format these lines using regular Markdown (e.g. copy and paste, indent using the "code" button), and then press the "blockquote" button, what you get is:
If you want to append a file to another, and do other stuff, use
cat
:cat one_file > other_file; with a really long command after that;
blah yada foo;
… thus breaking the long line of code. Here's the actual wrong Markdown source:
> cat one_file > other_file; with a really long command after that;
> blah yada foo;
This is somewhat tedious to fix, as it involves checking every line manually, removing the >
, et cetera.
How to fix?
When converting to a block quote, WMD should check that long lines formatted as code are not wrapped automatically. The auto-wrapping works for regular text, but pre-formatted text should of course not be wrapped.