HTML 5 collapsable information - works in a Github/Gitlab issue
By Mike Street
HTML5 has bought many great things to this world. Among them lay the
<details> tag. Not supported in IE the
<details> tag allows for a quick show/hide functionality which so happens to work in Markdown. This means Github and Gitlab issues can be tidied up.
I was submitting an issue today that included a big chunk of code which would only mean something to the author of the code. Rather than fill up the issue with a code block (making if harder for others to identify if they were having the same issue) I was able to wrap it in a details block to create a browser handled toggle box.
<details> <summary>Title of your toggle box (what is inside)</summary> Contents of your toggle box (including code if you wish) </details>
This makes a nice little toggle box. You can see it in action in the issue.