10

This is just so there's something I can link to on the meta when this issue comes up.

Is it possible to quote multi-line text on the Stack Exchange software?

4
  • 1
    Might be worth editing this to cover how to do multi-line spoiler blocks (which people tend to have rather more trouble with).
    – Rand al'Thor Mod
    Mar 4 '17 at 22:56
  • @Randal'Thor I made the answer community wiki, so feel free to edit that information in. (aka I don't know how to do multiline spoiler blockquotes, I tried and failed miserably).
    – user111
    Mar 4 '17 at 23:04
  • (BTW, you can always link to the editing help.)
    – Mithical Mod
    Mar 5 '17 at 8:12
  • @Mithrandir actually I can't, because the editing help page doesn't explain how to do multi-line quotes.
    – user111
    Mar 6 '17 at 14:36
11

Yes it is. Put two spaces at the end of each line and it will work.

For example, the following code will create a multi-line quote. Highlight the code with your mouse to see the spaces at the end of each line.

> That corpse you planted last year in your garden,  
Has it begun to sprout? Will it bloom this year?  
Or has the sudden frost disturbed its bed?  
Oh keep the Dog far hence, that’s friend to men,  
Or with his nails he’ll dig it up again!  

Here's what that code outputs:

That corpse you planted last year in your garden,
Has it begun to sprout? Will it bloom this year?
Or has the sudden frost disturbed its bed?
Oh keep the Dog far hence, that’s friend to men,
Or with his nails he’ll dig it up again!


In fact, the same works for spoiler blocks, although in this context you also have to put two spaces at the end of each blank line as well as each line of text. For example, the following code (as before, highlight to see the double spaces) ...

>! At the end of Shakespeare's Hamlet,  
>! which was a very good play,  
>!  
>! nearly everyone dies.

... produces the following output:

At the end of Shakespeare's Hamlet,
which was a very good play,

nearly everyone dies.

2
  • I tend to use a line-break in multi-line spoiler blocks <br>.
    – Valorum
    Mar 6 '17 at 1:05
  • 1
    Nnnnnooooo you spoiled Hamlet for meeeee
    – Standback
    Mar 6 '17 at 8:19

You must log in to answer this question.