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!");<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>
Test comment before posting upstream! ๐
FYI ... I think that the space thing has largely been resolved ... as I've used these in lists (both ordered and unordered) in the past. ๐
I think it is only required if you are including markdown inside the spoiler.
I accept that this may have been the whole purpose of this gist, given the title, but ... just thought I'd mention it.
How To
Working with the example above ...
Visual
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>... just make sure you close</details>afterward.Code