2

In my translation golf question, I couldn't get separate paragraphs to be hidden (until mouseover) with the markdown >! -- I had to run the paragraphs together to get it to work. Hope someone will edit my question, fix it, and explain how they got it to work right.

4
  • Seems like a bug worth reporting on meta.stackexchange.com. Also, why do you need to hide that text? :) – Flimzy Apr 30 '17 at 8:18
  • @Flimzy we agreed on making translation-golf questions include a dummy translation to fulfill the requirement of "show your attempts first". – fedorqui 'SO stop harming' Apr 30 '17 at 18:44
  • @fedorqui Ah, fair enough. – Flimzy Apr 30 '17 at 18:53
  • 1
    @Flimzy and the part about hiding is because aparente001 mentioned that It takes too much effort to ignore the first version when it's sitting right there on the screen, right below the original. So hiding it seems to solve the problem. – fedorqui 'SO stop harming' Apr 30 '17 at 18:57
3

Right now it is not possible to have multi-line spoilers using normal paragraphs:

>! This is something.

>! And this is another thing.

does not render as a spoiler, but rather as:

! This is something.

! And this is another thing.

However, you can trick it a bit and get a new spoiler line by inserting the spoiler markdown plus two spaces (>!). To get a blank line between paragraphs, do that twice. To show you how to do this, I will use another trick, and insert four blanks at the beginning of each line, to make it visible:

>! Paragraph 1
>!                # (this line contains two trailing spaces)
>!                # (this line contains two trailing spaces)
>! Paragraph 2

The result:

this is something

I want to hide

It is not the perfect solution, since it does not group in paragraphs but in <br />-like format. But it is at least better.

See What's the exact syntax for spoiler markup for an explanation on how it works by the DEV who implemented it:

The way the spoiler works is as follows.

If each line in a blockquote (built via >) begins with a !, it will be treated as a spoiler.

Also see How to do multi-line spoilers properly? for the trick I revealed above.

Alternatively, you can insert <br> in your stream of text, wherever you would like a paragraph separation to occur.

1
  • 1
    This is great. I think for me the easiest thing will usually be to just insert the <br> where I want the separation. But if I have a lot of text, the >! space space approach will be preferable so I can see my text clearly while composing. – aparente001 Apr 30 '17 at 19:14

You must log in to answer this question.

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