fix(build): don't warn on blank lang in fences

pull/1805/head
Divyansh Singh 2 years ago
parent 1ae0596939
commit 99ad162fb7

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

Loading…
Cancel
Save