7

You ever had a post in front of you where the OP did mix up blockquote and code formatting? Not those easy cases where he/she wrote a > character before the paragraph himself, but those cases when you have several dozen lines of code or command output, often with line lengths greater than the edit window's width, and the OP used the blockquote-formatting-button!

In such cases, it does not only add the > character in front of every line, but also totally messes up every kind of indentation and reorganizes all the line breaks to fit the editor window width instead of the original structure.

You are not sure what I mean? Here is a horrible example in its original state (with blockquotes):
Wrongly used blockquote formatted question
And here is my attempt to fix the structure as good as I can:
(Hopefully mostly) correct formatting

I propose to change the behavior of the blockquote formatting button!

The optimal and easiest way to convert a paragraph to a blockquote would be to just write a single > in front of the paragraph's first line and keep all indentations and line-breaks just as they are. The output will be no different. If you have problems implementing this with checking the end of the paragraph (I don't think so, but...), it would be even an improvement if we stay with the > sign in front of every line selected to be formatted as blockquote and just stop reformatting the content!

Everybody who once tried to edit such a monster has to vote for this and hope for the StackExchage stuff to soon implement this. Thank you for your support and any reactions.

  • Same question on the big Stack Exchange Meta. Please also vote there if you want to see this feature implemented. – Byte Commander Jul 17 '15 at 6:59
  • I'm failing to see how it destroyed the original formatting, both spaces and tabulations are kept, in every position (at the start, in the middle, at the end) – kos Jul 17 '15 at 9:25
  • Ah I see, the line breaks are messed up, but that's OP's fault, who likely put a > character before each of what he tought was a separate line (according to how he saw them in the editor), ending up putting multiple > characters on each line; using the blockquote formatting button would have retained the original line breaks, try writing say 3 long strings and formatting them using the button, only 3 > characters (in the right position) will be put. – kos Jul 17 '15 at 9:39
  • 2
    Upvoted both, but I think @kos is right: it was the user who formatted this badly... Actually, after a bit of research: this was posted first, and he just copy-pasted from NerdAnswer to AU... – Fabby Jul 17 '15 at 10:23
  • I remember using emacs to fix those... not anymore. I prefer that the OP copy the thing again, they should make sure that their post is at least presentable. – Braiam Jul 23 '15 at 19:58
4

The problem only happens with short lines (or rather, with lines containing short enough words), where the editor wraps a paragraph, leading it to fit as many words as it can into each line.

aaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbbbbb
cccccccccccccccccccccccccc

Take this and block quote it:

aaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccc

The editor actually produced:

> aaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb
> cccccccccccccccccccccccccc

So, yes, we could fix the editor to not do wrapping when quoting. The editor also messes up when unquoting:

> aaaaaaaaaaaaaaaaaaaaaaaaaa
> bbbbbbbbbbbbbbbbbbbbbbbbbb
> cccccccccccccccccccccccccc

Becomes, on unquoting:

aaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccc

aaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccc

Yes, this is an editor "feature".

Regarding splitting and merging: This is due to wrapping and the editor does it what it needs to do wrap correctly, so both splitting and merging happen. Consider the previous example with longer words, so that the line is long enough to wrap (you can see this from the scroll bars):

aaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccc

If I quote this:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccc

> aaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb
> cccccccccccccccccccccccccccccc

The editor automatically splits the line.

  • This is a problem, but it's not the problem we're talking about; check the example; lines there are splitted, not merged, and this is up to the user who did the formatting, not up to the blockquote button acting fuzzily. – kos Jul 20 '15 at 6:48
  • @kos both splitting and merging are done during wrapping. So, yes, this is due to the editor, not due to the user. – muru Jul 20 '15 at 6:49
  • What do you mean? OP is discussing an editor's "feature". Do you think the editor's "feature" is the cause of that bad formatting? – kos Jul 20 '15 at 6:51
  • @kos yes, very much so. – muru Jul 20 '15 at 6:51
  • It's not; long lines are not splitted, although short lines are indeed merged; again, I agree this is a problem , but it's not about OP's example. – kos Jul 20 '15 at 6:54
  • @kos they are, your example is flawed since it is a single word. – muru Jul 20 '15 at 6:54
  • @kos see the new example. – muru Jul 20 '15 at 6:56
  • Ok now it's clear. Upvoted; unfortunately I can't delete my answer, since it has been accepted – kos Jul 20 '15 at 7:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .