From a8e9a24ca7fcab22945a17b38e6c81c395da52e5 Mon Sep 17 00:00:00 2001 From: ChenZhaoYu <790348264@qq.com> Date: Fri, 17 Mar 2023 09:49:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20highlight.js=20=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0=E5=85=BC=E5=AE=B9=E6=80=A7=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chat/components/Message/Text.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, '') },