Skip to content

Instantly share code, notes, and snippets.

@Ashton-W
Last active May 7, 2024 09:33
Show Gist options
  • Star 87 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save Ashton-W/864d09d71f7cb8e5b47ebaac02b98455 to your computer and use it in GitHub Desktop.
Save Ashton-W/864d09d71f7cb8e5b47ebaac02b98455 to your computer and use it in GitHub Desktop.
GitHub Markdown toggle code block
Click to toggle contents of `code`
CODE!
Click to toggle contents of other `code`
MORE CODE!
<details>
<summary>Click to toggle contents of `code`</summary>
```
CODE!
```
</details>
@YusufAbdelaziz
Copy link

Thanks :D

@maiconhenriquefa
Copy link

Thanks!

@kellyihyeon
Copy link

Thanks !

@joserojel-helix
Copy link

Code is not showing properly in Mac/Chrome.

@douglas-pires
Copy link

Try adding an extra space after <details>

For example:

{
    "some": "json"
}
function myFunction(): string {
  return "Hello!"
}

@imblurry
Copy link

Thank you so much!

@sasankaweera123
Copy link

Thank you this was very useful

Copy link

ghost commented Jan 21, 2023

thank you!!!!!

@per2jensen
Copy link

Thank you, very nice snippet :-)

@mhoffnn
Copy link

mhoffnn commented May 10, 2023

Nice :shipit:

@CharlyLegrandMartin
Copy link

Perfect! 🪄 Thanks!

@dhruvvyas25
Copy link

How to toggle with a second-level heading?

@emilienbidet
Copy link

Thanks

@zinzinzibidi
Copy link

Thanks!

@VoiceBeer
Copy link

thx :>

@SivaNagendraa
Copy link

Thank you

@usama-rahman
Copy link

thx

@stanley-ubidata
Copy link

Amazing! Thanks a lot!

@thesardorbroo
Copy link

thanks

@mustard-mh
Copy link

Thanks!!

@yippee0539
Copy link

yippee0539 commented Apr 20, 2024

This is a test
hello, world!

@horbjorn
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment