42

While trying to assist with the formatting of a question which spoilers a list, I discovered there's not a lot of parity between how spoilers and quote blocks (which are superficially quite similar) handle nested Markdown formatting. (Simple HTML works fine.)

For example, here's a variety of typical Markdown nested inside a quote block:

heading


paragraph

code block
  • nested
    1. list

even nested quotes!

  • with nested nested formatting!

Aside from the code and quote blocks not standing out due to matching background colors, everything works exactly as expected. Sadly, the same is very much not true for spoilers:

### heading --- paragraph code block - nested 1. list > even nested quotes! > > - with nested nested formatting!

Eek! Any chance of changing spoilers to act more like quotes? Needing complex formatting in spoilers isn't a terribly common scenario, but when you do, the inconsistency is jarring and a bit frustrating.

1

1 Answer 1

19

HTML, baby.

heading


paragraph

code block
  • nested
  1. list

even nested quotes!

  1. with nested nested formatting!

Yes, okay, not everything hides (looking at you, <hr> and <code>)... but that's a different bug report, now, isn't it?

(On Meta Gaming, where this post came from, the above made two nested spoiler blocks where the inner area is only visible on hover of the inner block. The same thing happens in the mobile version of MSO, but not here.)

11
  • So because the less common forms of styling work poorly, we shouldn't be concerned that the more common forms don't work at all? Not a very satisfying solution. :-)
    – Ben Blank
    Commented Dec 20, 2011 at 16:14
  • 1
    @Ben I'm proposing HTML as an uncommon solution to an admittedly uncommon problem. Personally, everything that gets in the way of abuse of spoiler tags is a positive thing in my book. Notice that Markdown's syntax for non-paragraph-level formatting (italic bold code etc.) still works.
    – badp
    Commented Dec 20, 2011 at 17:10
  • I'm just seeing the <hr>. The <code> section is hiding just fine here (FF 5 [good gravy, I need to update] Win7).
    – Pops
    Commented Dec 20, 2011 at 20:26
  • @PopularDemand Hence the paragraph I've added in parentheses. As I said, that's a different bug report that does belong to meta gaming.
    – badp
    Commented Dec 20, 2011 at 21:11
  • Hm, okay. Perhaps it'll make more sense to me after I get home (work started blocking Gaming SE).
    – Pops
    Commented Dec 20, 2011 at 21:18
  • Caveat: this spoiler tag is unreadable on the chat.SE android app.
    – badp
    Commented Apr 21, 2014 at 11:21
  • 2016: markdown still doesn't work, code blocks are hidden, <hr> still isn't. Oddly enough, if you go to the revisions page of this post, the inner block also appears on hovering anywhere inside the main block, but requires hover on it here on the post itself.
    – muru
    Commented Jun 27, 2016 at 19:36
  • 7
    This is a common problem on Puzzling. We use spoilers for all of our answers.
    – hat
    Commented Dec 27, 2018 at 7:39
  • 3
    Seems both the horizontal rule and the code block are hidden by the spoiler tag now.
    – V2Blast
    Commented Nov 1, 2019 at 21:20
  • 3
    This doesn't work for tables today. Table support was added recently, but only when using Markdown; the <table> element is still explicitly unsupported. This thus doesn't work in that case. Commented Jan 21, 2021 at 22:37
  • I get a "Hasta la vista, baby" vibe! or like this: They asked me to upgrade to Windows 8, but I said.... I still love Vista, baby! Commented Oct 11, 2021 at 7:53

You must log in to answer this question.

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