Using <details> tag on Github easily
I am a big fan of using Github issues for taking notes on the steps I am taking while debugging a weird behaviour or verifying some changes I made, or anything else where having a record of the steps I took will help me or someone else in the future.
Github supports HTML <details> tag
These issues tend to become long, specially because I paste logs or outputs of the code I am running. To make the issues (and comments) more readable, I use the ketanbhatt.com/github-d… heavily. This is, thankfully, supported by Github’s flavour of Markdown.
Use Text Replacement (or other means) to avoid typing the tags
Even though I use this tag almost 5 times a day, and curse having to type so much to get the tag working, and get confused if it is <details><summary></summary></details> or <summary><details></details></summary> (don’t blame me, they both make sense!), I never tried to improve my situation. Until today.
Today I decided to add a text replacement (support.apple.com/en-ie…) on my machine that will automatically turn ghdet to the correct syntax. I wrote this post to point people to:
the details tag and encourage them to use it
make it easy for people to use the tag!
You can add a new line character to the text to be replaced by pressing option + return while defining the replacement (yes, the same way you add a new line to any other app where pressing return would not help).
Let me know if you have any suggestions.