10

My understanding of how block quote formatting works is that a > at the start of a paragraph quotes the whole paragraph but allows the paragraph text to wrap to fit the available space. A > on each line prevents the paragraph from rewrapping, preserving what is on each original line.

I edited a post, replacing some lengthy German messages with the Google Translate version: How to find the printer url on linux (debian)?.

I tried preserving the individual lines with a > on every line, but the post is still rendered with continuous wrapping.

Is there a secret to preserving lines within block quotes? Any chance that the problem relates to the Linux EOL vs. Windows EOL?

0

1 Answer 1

9

The blockquotes works on the assumption that you have an actual quotation that needs to be formatted as plain word wrapped text. It does not preserve line endings unless you insert them with a double space at the end of a line.

In the case of command line output a codeblock quote, four leading spaces per line rather than "> ", will preserve line endings correctly and has the benefit of using a monospace font which can preserve other features of command line output such as tabkes, grids and alignment that is done using spaces.

3
  • pre tags also work here
    – Journeyman Geek Mod
    Commented May 2, 2017 at 7:23
  • And to clarify the > on each line idea, it isn't required. Consecutive lines of text are treated like a single paragraph (only the initial > is needed). The double space at the end of a line just prevents wrapping at that location, it doesn't affect the paragraph.
    – fixer1234
    Commented May 2, 2017 at 8:12
  • Of course, if you have a quote that is multiple paragraphs, you need (at a minimum) a > at the beginning of the first paragraph (i.e., at the beginning of the quote) and, thereafter, one at the beginning of each subsequent paragraph OR the blank line between paragraphs. Commented May 12, 2017 at 4:22

You must log in to answer this question.

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