From 867f30588687c4f9228c1511bee672074e54c802 Mon Sep 17 00:00:00 2001 From: xinconan Date: Thu, 28 Jul 2022 23:30:19 +0800 Subject: [PATCH] feat(build): support code highlight in uppercase (#1082) fixes #772 Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> --- src/node/markdown/plugins/highlight.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/markdown/plugins/highlight.ts b/src/node/markdown/plugins/highlight.ts index 8e34e813ee57..0b373475a9be 100644 --- a/src/node/markdown/plugins/highlight.ts +++ b/src/node/markdown/plugins/highlight.ts @@ -14,7 +14,7 @@ export async function highlight(theme: ThemeOptions = 'material-palenight') { return (str: string, lang: string) => { const vPre = vueRE.test(lang) ? '' : 'v-pre' - lang = lang.replace(vueRE, '') + lang = lang.replace(vueRE, '').toLowerCase() if (hasSingleTheme) { return highlighter