Skip to content

Instantly share code, notes, and snippets.

@SanariSan
Forked from jbsulli/GitHub spoiler markdown.md
Created September 15, 2024 21:40
Show Gist options
  • Save SanariSan/26921e7b27a7a19aa4c2e79e89f00f27 to your computer and use it in GitHub Desktop.
Save SanariSan/26921e7b27a7a19aa4c2e79e89f00f27 to your computer and use it in GitHub Desktop.

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");

How to:

<details>
  <summary>Spoiler warning</summary>
  
  Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the `<details>` tag... just make sure you close `<details>` afterward.
  
  ```javascript
  console.log("I'm a code block!");
  ```
  
</details>

Credits:

dear-github/dear-github#166

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