# What could a "spoiler tag" extension look like?

**URL:** <https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767>\
**Category:** Extensions\
**Created:** [October 6, 2014, 4:05am UTC](https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767 "2014-10-06T04:05:05Z")\
**Posts on this page:** 8\
**Page:** 5

<div class="post-metadata">

**Author:** ![Crissov](https://talk.commonmark.org/user_avatar/talk.commonmark.org/crissov/32/1455_2.png) [@Crissov](https://talk.commonmark.org/u/Crissov)\
**Post date:** [February 8, 2019, 4:06pm UTC](https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767/81 "2019-02-08T16:06:40Z")

</div>

Just a thought: could spoilers be treated as a special kind of deleted content `<del>`?

```markdown
~foo~
~~bar~~
 ~~~~baz~~~~
 ~~~~~~~~quuz~~~~~~~~.
<sub>foo</sub>
<s>bar</s>
<del>baz</del>
<del class="spoiler">quuz</del>

```

---

<div class="post-metadata">

**Author:** ![aoudad](https://talk.commonmark.org/letter_avatar_proxy/v2/letter/a/b782af/32.png) [@aoudad](https://talk.commonmark.org/u/aoudad)\
**Post date:** [February 14, 2019, 5:05am UTC](https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767/82 "2019-02-14T05:05:40Z")

</div>

```css
> If this is a blockquote

>! and this is a block spoiler

```

```css
[> then this could be an inline quote using `<q>`]

[>! and this could be an inline spoiler.]

```

---

<div class="post-metadata">

**Author:** ![mofosyne](https://talk.commonmark.org/user_avatar/talk.commonmark.org/mofosyne/32/1438_2.png) [@mofosyne](https://talk.commonmark.org/u/mofosyne)\
**Post date:** [February 28, 2019, 2:02pm UTC](https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767/83 "2019-02-28T14:02:51Z")

</div>

**Looks good @aoudad. I like the simplicity. Plus it degrades… sort of ok**

render: [commonmark.js demo](https://spec.commonmark.org/dingus/?text=%0A%3E%20If%20this%20is%20a%20blockquote%0A%0A%3E!%20and%20this%20is%20a%20block%20spoiler%0A%0A%5B%3E%20then%20this%20could%20be%20an%20inline%20quote%20using%20%60%3Cq%3E%60%5D%0A%0A%5B%3E!%20and%20this%20could%20be%20an%20inline%20spoiler.%5D%0A%0A)

* * *

For the slightly weird edge case of wanting to hide or shrink the pgp keyblock so it doesn’t take up visual space… Its ok

```
>! -----BEGIN PGP PUBLIC KEY BLOCK-----
>! Version: 2.6.i
>!
>! mQCNAi+UeBsAAAEEAMP0kXU75GQdzwwlMiwZBUKFUDRgR4wH9y5NP9JaZfVX8shT
>! ESbCTbGSEExB2ktEPh5//dkfftsKNlzlAugKFKTgBv20tQ9lDKfdbPVR0HmTLz0e
>! wVIeqEue4+Mt/Kq7kMcQy+5sX2RBAiZTYl0n/JdY/WxflU0taq1kH/UUPkklAAUR
>! tB5NYXJ0eSBNY0ZseSA8bWFydHlAZnV0dXJlLmNvbT6JAJUCBRAvlHhGrWQf9RQ+
>! SSUBAQX+BACnhx7OTb1SfAcJVF/1kuRPUWuGcl57eZgv4syc1O9T3YNr0terWQBT
>! K0vFR00FdaBv9X9XwlxaBJHGeiBcmhaiOTwB912ysoteUzZHne3sHPw3MkYboAFx
>! xHg43Cnj60OeZG2PKp/kU91ipOJP1cs8/xYOGkeoAMqDfwPeFlkBiA==
>! =ddBN
>! -----END PGP PUBLIC KEY BLOCK-----

```

---

<div class="post-metadata">

**Author:** ![sbrl](https://talk.commonmark.org/user_avatar/talk.commonmark.org/sbrl/32/1542_2.png) [@sbrl](https://talk.commonmark.org/u/sbrl)\
**Post date:** [April 4, 2019, 7:04pm UTC](https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767/84 "2019-04-04T19:04:39Z")

</div>

Discord have now added support for spoilers, but they are using the `||spoiler||` syntax instead.

I think this really needs standardising.

@aoudad I like the block spoiler there, but the inline one looks weird.

---

<div class="post-metadata">

**Author:** ![mofosyne](https://talk.commonmark.org/user_avatar/talk.commonmark.org/mofosyne/32/1438_2.png) [@mofosyne](https://talk.commonmark.org/u/mofosyne)\
**Post date:** [July 11, 2021, 9:01am UTC](https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767/85 "2021-07-11T09:01:04Z")

</div>

Heads up that reddit is now using this format as a sitewide standard for spoilertext [https://reddit.zendesk.com/hc/en-us/articles/360043033952-Formatting-Guide](https://reddit.zendesk.com/hc/en-us/articles/360043033952-Formatting-Guide)

```auto
>!spoilers!<

```

Key thing is they have `!<` to close off a spoiler. This will be curious to figure out how to work out between inline and block spoilers.

But anyway this is an additional point for `>!` inclusion in the next standard update.

---

<div class="post-metadata">

**Author:** ![BenjaminHoegh](https://talk.commonmark.org/user_avatar/talk.commonmark.org/benjaminhoegh/32/2298_2.png) [@BenjaminHoegh](https://talk.commonmark.org/u/BenjaminHoegh)\
**Post date:** [August 22, 2021, 11:39am UTC](https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767/86 "2021-08-22T11:39:32Z")

</div>

To summit it up we have 3 live versions where two of them is very similar

- [Discord](https://support.discord.com/hc/da/articles/360022320632-Spoiler-Tags-) using `||spoilers||`
- [Reddit](https://reddit.zendesk.com/hc/en-us/articles/360043033952-Formatting-Guide) using `>!spoilers!<`
- [Stack Cummunity](https://stackoverflow.com/editing-help) using `>!spoilers`

This make me wonder will it make sense to change the blockqoute standard a little and add a required space after `>` In that way we could use `>!` for block spoilers and make it act in the same way as a blockqoute. then we could use `>!spoilers!<` for inline.

```auto
This >!spoilers!< is inline

```

```auto
>! This is a block spoilers 
and it works the same way as blockqoute it can contain other tags inside it.

>! It can also continue just like a normal blockqoute

```

I personally find it a good solution as the pros and cons are good.

Pros:

- Big platforms like [Reddit](https://reddit.zendesk.com/hc/en-us/articles/360043033952-Formatting-Guide) and [Stack](https://stackoverflow.com/editing-help) can keep their current solutions.
- It is a syntax that people are familiar with.
- It feels like markdown and easy to use as it reminds people of blockqoutes.
- The syntax of inline and block is familiar.

Corns:

- We would have to change the blockqoute standard by adding a required space. However the impact of this is very little as it is already good practice and used in most editions.
- [Discord](https://support.discord.com/hc/da/articles/360022320632-Spoiler-Tags-) would have to change their syntax, but as most user on the platform doesn’t use markdown when chatting it should not be a bigger problem.

---

<div class="post-metadata">

**Author:** ![Catija](https://talk.commonmark.org/user_avatar/talk.commonmark.org/catija/32/2164_2.png) [@Catija](https://talk.commonmark.org/u/Catija)\
**Post date:** [September 7, 2021, 4:32pm UTC](https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767/87 "2021-09-07T16:32:26Z")

</div>

> [@BenjaminHoegh](#):
>
> ```auto
> >! This is a block spoilers 
> and it works the same way as blockqoute it can contain other tags inside it.
> 
> >! It can also continue just like a normal blockqoute
> 
> ```

If you’re trying to continue the same spoiler block, I think you’d need additional markup in the empty line:

```auto
>! This is a block spoilers 
and it works the same way as blockqoute it can contain other tags inside it.
>!
>! It can also continue just like a normal blockqoute

```

Not trying to be nitpicky, just pointing out the standard. If you have an empty line, in CM, it will be a break between two quotes, like this:

> Stuff 1

> Stuff 2

```auto
> Stuff 1

> Stuff 2

```

As opposed to if you do have the extra bracket:

> Stuff 1
> 
> Continued stuff 1

```auto
> Stuff 1
> 
> Continued stuff 1

```

So, if you’re trying to echo that, you’ll need to have the `>!` in that line. 🙂

Also, technically, no platform needs to change their standards (provided they’re not in conflict with another usage - so if || was used to denote something else in CM) - you can have customized ones for your own platform - Discord would just need to _add_ the “official” version - not necessarily remove their current one.

---

<div class="post-metadata">

**Author:** ![BenjaminHoegh](https://talk.commonmark.org/user_avatar/talk.commonmark.org/benjaminhoegh/32/2298_2.png) [@BenjaminHoegh](https://talk.commonmark.org/u/BenjaminHoegh)\
**Post date:** [September 7, 2021, 5:23pm UTC](https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767/88 "2021-09-07T17:23:09Z")

</div>

Oh! totalt forgot that CM has a different way to handle blockqoutes. But I agree

[Previous page](https://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767.md?page=4)
