GitHub Collapsible Markdown
gist.github.com
gist.github.com
The details and summary elements are part of HTML5.
They've been implemented in WebKit and Gecko since at least 2016.
https://html.spec.whatwg.org/multipage/interactive-elements....
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/de...
The more you know!
- https://github.com/mxstbr/github-markdown-tricks
- https://github.com/shaunlebron/github-markdown-hacks
- https://grantwinney.com/cool-markdown-tricks-for-github/
- https://ourcodeworld.com/articles/read/162/tips-and-tricks-t...
If you just search "github markdown tricks", you'll find some others, as well.
Markdown passes through HTML (by default), and HTML5 includes "details". Almost all browsers support it, but IE (even IE 11) does not: https://caniuse.com/#feat=details - whether or not that matters depends on your users/customers. (You may insert your complaints about IE here :-) ).
Maybe something like
^ Header
^^^
Collapsed
^^^
Similar to code blocks with the ``` syntax. I dunno.
GitHub hardly styles it at all. It applies a margin-top on top of what normalize.css does. It's 99% your browser's default style sheet at work.
Example: https://github.com/timdorr/tesla-trip/pull/107
The show the recent release notes, changelogs, and recent commit history behind what you're about to upgrade. That's immensely helpful when deciding what you want to update in your dependency list, especially if there are breaking changes. Dependency management is much less of a pain this way.
Also yes it is a "hack" and not official markdown, but for the use case I mention it has the huge advantage to not make tickets including all the comments excessively long
<details>
<summary>Title</summary>
...
</details>Emacs has been able to collapse markdown for a long time now. There's no reason why that can't be implemented in other renderers.