Open nenadalm opened 4 years ago
Hi. I was thinking about showing some collapsible source code and found that it can be done using markdown: https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab#gistcomment-2705100
In devcards, it doesn't work with code blocks though.
This works (hidden text is visible only after clicking the arrow):
hidden text
<details> <summary>Source</summary> hidden text </details>
This doesn't work (code block is not inside details element anymore in DOM):
details
<details> <summary>Source</summary> ```clojure (prn \"hello\")
Hi. I was thinking about showing some collapsible source code and found that it can be done using markdown: https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab#gistcomment-2705100
In devcards, it doesn't work with code blocks though.
This works (
hidden text
is visible only after clicking the arrow):This doesn't work (code block is not inside
details
element anymore in DOM):