A simple spoiler at the top of the question works, but the bug is that spoilers don't work further down the page.
I wanted to create a spoiler at the end of an answer, so I added the text in a spoiler block (based on the information in What is >!
in formatting?:
>! One way to fix the problem — not necessarily the best, by any stretch of my
>! imagination, but one which works — is to fix the the LHS of the `lhs << (15 - i)`
>! shift so that it is either 0 or 1 that is shifted. For example:
>! `((ptr[j] & (1 << (7 - i % 8))) ? 1 : 0) << (15 - i)`
And the spoiler here is the same, not indented:
! One way to fix the problem — not necessarily the best, by any stretch of my ! imagination, but one which works — is to fix the the LHS of the
lhs << (15 - i)
! shift so that it is either 0 or 1 that is shifted. For example:!
((ptr[j] & (1 << (7 - i % 8))) ? 1 : 0) << (15 - i)
And, as you can see, the spoiler doesn't work. That seems to be a bug.
Solution
Thanks Madara Uchiha. The solution is to ensure that even blank lines in the spoiler are prefixed with >!
.
One way to fix the problem — not necessarily the best, by any stretch of my imagination, but one which works — is to fix the the LHS of the
lhs << (15 - i)
shift so that it is either 0 or 1 that is shifted. For example:((ptr[j] & (1 << (7 - i % 8))) ? 1 : 0) << (15 - i)
>! One way to fix the problem — not necessarily the best, by any stretch of my
>! imagination, but one which works — is to fix the the LHS of the `lhs << (15 - i)`
>! shift so that it is either 0 or 1 that is shifted. For example:
>!
>! `((ptr[j] & (1 << (7 - i % 8))) ? 1 : 0) << (15 - i)`
Residual bugs that still need fixing
The bug, then, is that the behaviour of spoiler text is not spelled out clearly in the documentation, nor in answers to other questions about spoilers that I've seen. Also, the normal convention that 5 spaces after a leading >
goes into code mode
does not seem to work with spoilers. That too should be mentioned (or, better, fixed). Spoilers aren't just 'ordinary quoted blocks starting with >!
instead of just >
'; there are many differences, at least when you count them on the 'zero, one, many' scale.
Put succinctly, spoilers are still inadequately documented.
It would be helpful if the advanced help in the Markdown help is complete enough to explain such pitfalls (or is it pratt-falls?).
Also:
And I see that it is not deemed to be a bug but a support issue. Hmmmm…
>
from a quote that renders in a single block and placing!
after it doesn't make that entire block a spoiler block? If that really is what you intended it violates the principle of least surprise, and if I might be so bold a seemingly silly intention. Oooo, I said it. Silly.