mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-02-18 04:14:24 +08:00
fixed hilinejs plugin
This commit is contained in:
@@ -326,7 +326,7 @@ const md = MarkdownIt({
|
||||
highlight: function (str, lang) {
|
||||
if (lang && hl.getLanguage(lang)) {
|
||||
// 处理代码高亮
|
||||
const preCode = hl.highlight(lang, str, true).value
|
||||
const preCode = hl.highlight(str, { language: lang }).value
|
||||
// 将代码包裹在 pre 中
|
||||
return `<pre class="code-container"><code class="language-${lang} hljs">${preCode}</code></pre>`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user