For example, the comment at https://github.com/bitcoin/bitcoin/pull/5212#issuecomment-63047882 includes a pgp signature indicating agreement to merge. It would be very nice if github were smart enough (or even had a manual spoiler option) to hide the signature unless you click "view", so that they didnt use so much damn screen space.
Hi @TheBlueMatt! My rationale for closing this out is similar to the one in https://github.com/github/markup/issues/373#issuecomment-56908387. We're very closely following the development of the common Markdown standard--one of GitHub's employees is a member--and I would suggest that any improvements to Markdown be made through their channels. We are keen on picking up and using CommonMark as a future standard. Your best bet to get this accepted is to convince the CommonMark gurus that it's a worthwhile change to Markdown. Thanks!
Hi, does anyone know if there is a way to make spoiler text in any of the alternative supported markup formats? I went through the documentation of each briefly, the most promising possibility seemed to be 'rst', but my search so far was unfruitful and discouraging.
I'm most interested in using spoiler text on a github wiki page.
I thought about having a <div> with a special class that could show hide based on hover but realized that HTML is mostly stripped from GitHub markdown.
An alternative is to use ROT13 just like the newsgroups / mailing lists used to (still do). This works great for spoilers but doesn't address the long output problem of PGP data.
In the case of the later it is better to push the large data to a Gist and just link to it in the markdown of the comment.
Also GitHub lets you have more advanced link tags (<a>) so you could make a link with the text ROT13 and the title= attribute the normal text so anyone who hovers over the link will get the title popup tool tip. For example:
<a href="#" title="You are an amazing person.">Lbh ner na nznmvat crefba.</a>
Would render like this:
@sukima Cool idea about link-hover spoiler text for desktop, but useless for mobile (where hover, obviously, isn't a thing). Any ideas to extend it so it works for such, also? Is anonclickfunction handler usable here, instead?
Also, if I remember right:
<a title="You are an amazing person.">Lbh ner na nznmvat crefba.</a>
Lbh ner na nznmvat crefba.
ā:arrow_up:ā _should_ work for a hover-text fine ā i.e., 1 shouldn't need ahrefto make<a>work as required.⦠Anyone confirm on desktop?
@sukima, Thank you much for these ideas, this is significantly better than the answers I got here on stackoverflow: http://stackoverflow.com/questions/32814161/how-to-make-spoiler-text-in-github-wiki-pages
If you post it there I would accept it as the answer, as I am actually using your ROT13 + title attribute idea now :smile:
@TPS: nice thought -- it appears to me on firefox 43.0.4 that I need the href or the tooltip is not displayed.
@cbeck88 Apparently, an<a>without anhrefis practically (if not officially) deprecated.⦠How does:
<a id="spoiler1" href="#spoiler1" title="You are an amazing person.">Lbh ner na nznmvat crefba.</a>
Lbh ner na nznmvat crefba.
ā:arrow_up:ā work for anyone? The problem with a naked#target is that, of course, if 1 _clicks_ on it, 1 ends up elseplace on the page. I think the above should solve _that_, at least.
Also, checking that link, does:
<details>
<summary>Lbh ner na nznmvat crefba.</summary>
<p>You are an amazing person.</p>
</details>
Lbh ner na nznmvat crefba.
You are an amazing person.
If not, does:
<details>
<summary><a id="spoiler2" href="#spoiler2" title="You are an amazing person.">Lbh ner na nznmvat crefba.</a></summary>
<p>You are an amazing person.</p>
</details>
You are an amazing person.
WAT!? How did I not know GitHub renders details/summary like that? Iām shocked and amazed!!
@sukima On what platform/browser does it work for you?
@TPS Oh odd. It worked on iOS 9 Safari but doesn't seem to work on Firefox 44.0 on Max OS X :astonished:
Could those of you who use a Mozilla-based browser post what the<details><summary/></details>version above renders _as_? Also, is (as I suspect) the combined version above useless for those on a mobile Mozilla-based browser?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:44.0) Gecko/20100101 Firefox/44.0
That's what I figured would happen.⦠Anyone got an idea to get Mozilla browsers working, as well? This reminds me of kludging around IE a decade or so ago.⦠Speaking of which, anyone got any info how of the above render on MS or any other generally-used browsers?
Also, to follow-up on https://github.com/github/markup/issues/411#issuecomment-63131942, the discussion is @ http://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767. Please voice support there!
Most helpful comment
Also, to follow-up on https://github.com/github/markup/issues/411#issuecomment-63131942, the discussion is @ http://talk.commonmark.org/t/what-could-a-spoiler-tag-extension-look-like/767. Please voice support there!