|
|
@ -86,6 +86,7 @@ export async function highlight(
|
|
|
|
lang =
|
|
|
|
lang =
|
|
|
|
lang.replace(lineNoRE, '').replace(vueRE, '').toLowerCase() || defaultLang
|
|
|
|
lang.replace(lineNoRE, '').replace(vueRE, '').toLowerCase() || defaultLang
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (lang) {
|
|
|
|
const langLoaded = highlighter.getLoadedLanguages().includes(lang as any)
|
|
|
|
const langLoaded = highlighter.getLoadedLanguages().includes(lang as any)
|
|
|
|
if (!langLoaded) {
|
|
|
|
if (!langLoaded) {
|
|
|
|
console.warn(
|
|
|
|
console.warn(
|
|
|
@ -97,6 +98,7 @@ export async function highlight(
|
|
|
|
)
|
|
|
|
)
|
|
|
|
lang = defaultLang
|
|
|
|
lang = defaultLang
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const lineOptions = attrsToLines(attrs)
|
|
|
|
const lineOptions = attrsToLines(attrs)
|
|
|
|
const cleanup = (str: string) =>
|
|
|
|
const cleanup = (str: string) =>
|
|
|
|