markdown折叠展开代码

背景

有的时候,我们的代码太多,直接用cout<<"hello";很不方便。
我们可以将代码折叠。

效果

20190508215442216.gif

代码

普通代码折叠
<details>
<summary>展开查看代码</summary>
<pre><code>
System.out.println("Hello to see U!");
</code></pre>
</details>
html代码折叠
<details>
<summary>展开查看</summary>
<xmp>
<h1>hello</h1>
<h2>hello</h2>
</xmp>
</details>

提示

csdn的markdown解析器好像是自己写的,并不支持这种形式。希望CSDN可以解决这种问题。

posted @ 2020-02-20 15:43  NetRookieX  阅读(13)  评论(0编辑  收藏  举报