Github如何折叠文本块?
看看这个问题评论
请检查这是否符合dear-github issue 166中提到的内容:
支持可折叠部分:
<details>
<summary>Click to expand</summary>
whatever
</details>
查看此示例中的更多信息。
关键在于将所有内容都包装在
<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>
Gabriel Devillers在评论中提到,GitLab也支持类似的可折叠部分。
您也可以默认展开折叠的部分。
<details open>
<summary>click to collapse</summary>
this one starts expanded because of the "open"
</details>
---
;你只需要在<p>
标签内部放置有空行的围栏式代码块即可。 - Raphael