求助帖,markdown代码片段的高亮是怎么生成的?
insane018 opened this issue · comments
同样的代码使用了marked的插件
let { stat, exists, readfile } = require('fs');
我用marked解析出来的dom
<pre><code class="language-javascript">let { stat, exists, readfile } = require('fs');
</code></pre>
您的代码解析出来的dom
<code class=" language-javascript"><span class="token comment" spellcheck="true">
</span><span class="token keyword">let</span> <span class="token punctuation">{</span> stat<span class="token punctuation">,</span> exists<span class="token punctuation">,</span> readfile <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token function">require<span class="token punctuation">(</span></span><span class="token string">'fs'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment" spellcheck="true">
</span></code>
这个中间是有做什么转换吗?我转换后缺少一些dom节点