Commit a093ed3c authored by shirlyn.guo's avatar shirlyn.guo 👌🏻

Merge branch 'master' of https://gitlab.gsstcloud.com/poc/poc-fe into shirlyn

parents 8dde243d 762c52ba
<script setup lang="ts">
import { computed, ref, watchEffect } from 'vue'
import { marked } from 'marked'
import { Marked } from 'marked'
import { markedHighlight } from 'marked-highlight'
import { throttle } from 'lodash-es'
import DOMPurify from 'dompurify'
......@@ -20,7 +20,7 @@ const props = withDefaults(defineProps<Props>(), {
color: '#333',
})
marked.use({ gfm: true, async: true }).use(
const marked = new Marked(
markedHighlight({
emptyLangClass: 'hljs',
langPrefix: 'hljs language-',
......@@ -30,7 +30,7 @@ marked.use({ gfm: true, async: true }).use(
return hljs.highlight(code, { language }).value
},
}),
)
).use({ gfm: true, async: true })
const renderTextContent = ref('')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment