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.
1 Answer
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)
Your problem was that you wrote out two adjacent paragraphs:
>! 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 startanother 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.
-
3\$\begingroup\$ Grateful for the tip as my other uses of spoiler worked as advertised. \$\endgroup\$ Commented Feb 1, 2016 at 14:22
-
\$\begingroup\$ so should my question be marked as a duplicate? \$\endgroup\$– nitsua60Commented Feb 1, 2016 at 16:54
-
3\$\begingroup\$ 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. \$\endgroup\$– KRyanCommented Feb 1, 2016 at 20:36 -
1\$\begingroup\$ @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. \$\endgroup\$ Commented Apr 8, 2016 at 8:38 -
\$\begingroup\$ Is there a way to divulge this information on the Markdown Editing Help page? \$\endgroup\$– DaFluidCommented Apr 8, 2016 at 8:50
-
5\$\begingroup\$ @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. \$\endgroup\$ Commented Apr 8, 2016 at 9:08