MCPcopy Create free account
hub / github.com/xerrors/Yuxi / getHighlighter

Function getHighlighter

web/src/utils/markdown_preview.js:15–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14let highlighterPromise
15const getHighlighter = () => {
16 if (!highlighterPromise) {
17 highlighterPromise = createHighlighter({
18 themes: ['github-light', 'github-dark'],
19 langs: ['plaintext']
20 }).catch((error) => {
21 highlighterPromise = undefined
22 throw error
23 })
24 }
25 return highlighterPromise
26}
27
28const normalizeHtmlTagQuotes = (content) => {
29 const source = String(content || '')

Callers 2

getRendererFunction · 0.85
renderMarkdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected