The way spoiler works is as follows.
If each line in a blockquote
(built via >
) begins with a !
it will be treated as a spoiler.
So,
>! This is a spoiler
This is a spoiler
>! But this is
> not a spoiler
! But this is
not a spoiler
>! A multi-line spoiler
>! has ! multiple times
A multi-line spoiler
has ! multiple times
>! Alignment
> ! has no effect
> ! on spoilers
Alignment
has no effect
on spoilers
Due to wrinkle in how blockquotes
are generated, leading white space is pretty pointless.
> ! <- still a spoiler
<- still a spoiler
The actual code expects very specific html (this a "post markdown" process). In particular, omitting the inner <p>
will dodge "spoiler-ification".
The only way to guarantee a blockquote
becomes a spoiler is to use the explicit >! syntax.
Prior to implementing this, I did actually check for posts that would be affected by this syntax (on SO its under one-tenth of a percent*). Even on TeX, (where ! is rather likely to come up as a first character) it is exceedingly rare (lower than SO levels). People seem very biased towards using code
tags.
I'm not saying there aren't any, but any new syntax is going to catch somebody.
*Admittedly, I'm regex-ing wildly through lots of data, there is some room for error. Pretty sure I'm erroring on the side of over counting affected posts, though.
blockquote
contains a line that doesn't start with a!
its not a spoiler.>
line that will be ignored, and it'll prevent the spoiler-fication (since it's just a blockquote then).