How does github fold text blocks?
look at this issuecomment
Short Answer: No, Markdown does not offer a feature like that directly, but with some work you might be able to build something that works. For a feature like that to work you would need some CSS and/or JavaScript to control the animations, etc.
As a workaround I would suggest inserting a vertical bar (|) followed by hard spaces (Alt-Code on Windows: Alt+0160). This preserves the indent after the bar resulting in a visually acceptable solution for raw and rendered Markdown. This is a normal line of text. | This is an indented line of text.
Check if this follows dear-github issue 166, which mentions:
collapsible sections are supported:
<details> <summary>Click to expand</summary> whatever </details>
See more in this example.
The key is to wrap the whole contents inside the
<p>
:
<details><summary>stuff with *mark* **down**</summary><p> ## _formatted_ **heading** with [a](link) --- {{standard 3-backtick code block omitted from here due to escaping issues}} --- Collapsible until here. </p></details>
You can start the folded sections expanded by default as well.
<details open> <summary>click to collapse</summary> this one starts expanded because of the "open" </details>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With