From 2d00a9bc35d9804555bd9c1c9b07f8c46209bb70 Mon Sep 17 00:00:00 2001 From: ChenZhaoYu <790348264@qq.com> Date: Thu, 23 Feb 2023 11:54:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B6=88=E9=99=A4=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directives/highlight.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/directives/highlight.ts b/src/directives/highlight.ts index b4d2d18..ead6acf 100644 --- a/src/directives/highlight.ts +++ b/src/directives/highlight.ts @@ -2,6 +2,8 @@ import type { App, Directive } from 'vue' import hljs from 'highlight.js' import includeCode from '@/utils/functions/includeCode' +hljs.configure({ ignoreUnescapedHTML: true }) + function highlightCode(el: HTMLElement) { if (includeCode(el.textContent)) hljs.highlightBlock(el)