hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.57k stars 4.86k forks source link

Better support for three party highlight plugins #5429

Closed xihale closed 8 months ago

xihale commented 8 months ago

Check List

Feature Request

At https://github.com/hexojs/hexo/blob/master/lib/plugins/tag/include_code.ts#L76

return `<pre><code>${code}</code></pre>`;

It's better using this case:

return `<pre><code class="language-${lang}>${code}</code></pre>`;

Others

I am a user use neither prismjs nor hljs, and meanwhile I am a developer for hexo-shiki which is a simple glue code connecting shikijs and hexo. But when I use include_code tag, I got some error, with some debug, I think modify this line is the better solution(Just transfer the language parameters), for me and for any others who want to develop three party highlight plugin!

xihale commented 8 months ago

The problem is for I still use old hexo version.