# Is the spoiler markdown broken?

See https://rpg.stackexchange.com/a/74047/23970: Korvin and I think we've got everything right, but the spoiler hide/reveal text feature isn't working.

Yes, they're broken. They've been broken in this particular way for a couple of years now. There's no neat workaround. One spoiler paragraph sitting in lonely isolation is always fine, but combining them isn't so easy.

# What you did to break it (aka what to avoid)

>! one paragraph

>! another paragraph


which looks like this:

! one paragraph

! another paragraph

That break between the paragraphs messes up spoiler quotes.

# Fixing it

The way to patch it up & retain roughly the same intended appearance is to break up the paragraphs manually:

>! first paragraph can be left as-is
>! <p>other paragraphs need a <p> element at the start
>! <p>another paragraph
>!
>! <p>if you want to separate your paragraph lines in your editing, still use a >! on the empty lines like above.


which looks like this:

first paragraph can be left as-is

other paragraphs need a <p> element at the start

another paragraph

if you want to separate your paragraph lines in your editing, still use a >! on the empty lines like above.

or to divide the spoiler paragraphs completely:

>! one paragraph

<!-- -->

>! another paragraph


which gives you this:

one paragraph

another paragraph

The <!-- --> is an empty HTML comment. <!-- You leave comments in HTML like this. -->. The extra line breaks around the comment aren't important for the comment's sake. You can leave those literally anywhere and they're totally invisible, there's one in the middle of this sentence. You do at least need a line break above the comment to split the spoiler quotes. The line break after is optional but to me things look neater with it.

• Grateful for the tip as my other uses of spoiler worked as advertised. – KorvinStarmast Feb 1 '16 at 14:22
• so should my question be marked as a duplicate? – nitsua60 Feb 1 '16 at 16:54
• If you’re going to use HTML, using proper <p> tags is preferable to manual line breaks with <br>. It makes little difference in a traditional browser, but might make a significant difference in alternative contexts, especially screenreaders for the blind. – KRyan Feb 1 '16 at 20:36
• @KRyan I've updated with that. Incidentally, using those with HTML5's policy that <p> elements don't need to be closed gives us the neatest possible output and formatting. – doppelgreener Apr 8 '16 at 8:38
• Is there a way to divulge this information on the Markdown Editing Help page? – DaFluid Apr 8 '16 at 8:50
• @DaFluid That's maintained by SE Staff, and it's the same across all stacks. This breakage has been around for at least 3½ years at this point without resolution. – doppelgreener Apr 8 '16 at 9:08