diff --git a/src/views/chat/components/Message/Text.vue b/src/views/chat/components/Message/Text.vue index cca4d1a..95bb571 100644 --- a/src/views/chat/components/Message/Text.vue +++ b/src/views/chat/components/Message/Text.vue @@ -25,7 +25,7 @@ const mdi = new MarkdownIt({ const validLang = !!(language && hljs.getLanguage(language)) if (validLang) { const lang = language ?? '' - return highlightBlock(hljs.highlight(lang, code, true).value, lang) + return highlightBlock(hljs.highlight(code, { language: lang }).value, lang) } return highlightBlock(hljs.highlightAuto(code).value, '') },