5
\$\begingroup\$

I was writing this question about what Mordenkainen's main school of magic would be when I encountered a problem with how it was rendering spoiler quotes.

If I nest a blockquote (using the HTML <blockquote> tag) inside the spoiler quote, then any text after the nested blockquote is not hidden, even though it's still within the "spoiler area".

I'll show the bug here too:

This is a spoiler quote and is hidden.

This is a nested quote and is also hidden.
This should be hidden but is not.

I've also noticed the same issue on Meta Stack Exchange (see this answer).

Am I just doing something wrong, or has something changed, or is this simply a bug?

| |
\$\endgroup\$
4
\$\begingroup\$

After seeing the related Q&A on Main Meta (thanks to Rubiksmoose for finding it): Line after blockquote in spoiler not a spoiler?

I have solved the problem I was having by adding a <p> tag after the nested quote.


Specifically, what I had before (what I used in this meta question) is this:

>!This is a spoiler quote and is hidden.<blockquote>This is a nested quote and is also hidden.</blockquote>This should be hidden but is not.

But it works if it's changed to this:

>!This is a spoiler quote and is hidden.<blockquote>This is a nested quote and is also hidden.</blockquote><p>This should be hidden but is not.

This is another example of the above but with more line breaks and >! to make it clearer:

>!This is a spoiler quote and is hidden.
>!<blockquote>This is a nested quote and is also hidden.</blockquote>
>!This should be hidden but is not.

Which should be replaced by this:

>!This is a spoiler quote and is hidden.
>!<blockquote>This is a nested quote and is also hidden.</blockquote>
>!<p>This should be hidden but is not.

Either way, if you include that extra <p>, it renders it correctly like this:

This is a spoiler quote and is hidden.

This is a nested quote and is also hidden.

This should be hidden but is not.

| |
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .