Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit a8e9a24

Browse files
committed
fix: highlight.js 控制台兼容性警告
1 parent 9572484 commit a8e9a24

File tree

1 file changed

+1
-1
lines changed
  • src/views/chat/components/Message

1 file changed

+1
-1
lines changed

src/views/chat/components/Message/Text.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const mdi = new MarkdownIt({
2525
const validLang = !!(language && hljs.getLanguage(language))
2626
if (validLang) {
2727
const lang = language ?? ''
28-
return highlightBlock(hljs.highlight(lang, code, true).value, lang)
28+
return highlightBlock(hljs.highlight(code, { language: lang }).value, lang)
2929
}
3030
return highlightBlock(hljs.highlightAuto(code).value, '')
3131
},

0 commit comments

Comments
 (0)