How to add a collapsible section in markdown.
Example
Click me
Heading
- Foo
- Bar
- Baz
- Qux
Some Code
function logSomething(something) {
console.log('Something', something);
}
Code
<details>
<summary>Click me</summary>
### Heading
1. Foo
2. Bar
* Baz
* Qux
### Some Code
```js
function logSomething(something) {
console.log('Something', something);
}
```
</details>
Rules (If you don't do this, your code may not work)
- Always have an empty line after the
</summary>
tag - Always have an empty line after each
</details>
tag
Testing if nested open works..and it does. Closed is by default.
Hello