Formatting spoilers
You can insert a single-line spoiler easily by using >!
at the beginning of any line:
>! This is a spoiler
This is a spoiler
By default, spoilers on subsequent lines are merged into a single paragraph. To insert a line break, add two spaces at the end of a line:
>! This is the first line
<-- two spaces
>! This is the second line
<-- two spaces
>!
<-- two spaces
>! The spoiler markup followed by two spaces creates a blank line in the spoiler block.
>! This line is merged with the previous line, because the previous line doesn't end with two spaces.
This is the first line
This is the second line
The spoiler markup followed by two spaces (above) creates a blank line in the spoiler block.
This line is merged with the previous line, because the previous line doesn't end with two spaces.
A blank line between spoiler lines will break formatting:
>! This the first spoiler line
>! This is the second spoiler line
! This is the first spoiler line
! This is the second spoiler line
To separate two spoilers without text between them, you can insert a blank HTML comment between them:
>! This is the first spoiler
<!-- -->
>! This is the second spoiler
This is the first spoiler
This is the second spoiler
Spoilers in comments
Regular spoilers don't work in comments. If you feel like you need to hide something in a comment, here's a nice workaround mentioned by Alconja:
[ [SPOILER - hover to reveal] ](/. "super secret stuff")
[SPOILER - hover to reveal]
You can replace the /.
with any hyperlink; the point is not for people to click the hyperlink, but just to hover over it.
Markup inside spoilers
Some markup works the same inside a spoiler, while other markup works differently or is entirely broken.
>! Indenting four spaces will *not* create a code block.
>! <pre>You can create a code block by using `<pre>` tags instead.</pre>
>! <pre>
>! This even works
>! over multiple lines.
>! </pre>
Indenting four spaces will not create a code block.
You can create a code block by using <pre>
tags instead.
This even works
over multiple lines.
>! **Bold**, *italic*, and `fixed width text` all work as expected.
>! So do [hyperlinks](https://puzzling.stackexchange.com/help/formatting)
>! and images: ![sample image](http://example.com/img.jpg).
Bold, italic, and fixed width text
all work as expected.
So do hyperlinks
and images:
.
>! - Markup for bulleted lists *does not work*:
>!
>! 1. Numbered lists...
>! 1. ...do not automatically renumber.
>!
>! You can use HTML for lists instead:
>! <ul>
>! <li> bulleted list </li>
>! <ol>
>! <li> Nested numbered list </li>
>! <li> Number two </li>
>! </ol>
>! </ul>
- Markup for bulleted lists does not work:
1. Numbered lists...
1. ...do not automatically renumber.
You can use HTML for lists instead:
- bulleted list
- Nested numbered list
- Number two
>! > Block quote markup won't work inside a spoiler either.
>! <blockquote>You can use the `<blockquote>` tag instead.</blockquote>
> Block quote markup won't work inside a spoiler either.
You can use the <blockquote>
tag instead.
MathJax inside spoilers
See: Spoiler markup does not break line for series of MathJAX equations in post previews
featured
post meant for reference and specialty searches/lists and more, but probably only a single dispatch post that contains links to this and other Meta posts. $\endgroup$