From c90f51d309a0ec223adc7b360775274b1ef08a69 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Wed, 3 Aug 2022 13:07:50 +0530 Subject: [PATCH] fix: update language regex for line number class --- src/node/markdown/plugins/lineNumbers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/markdown/plugins/lineNumbers.ts b/src/node/markdown/plugins/lineNumbers.ts index 739b022279ac..43156e983444 100644 --- a/src/node/markdown/plugins/lineNumbers.ts +++ b/src/node/markdown/plugins/lineNumbers.ts @@ -21,7 +21,7 @@ export const lineNumberPlugin = (md: MarkdownIt) => { const finalCode = rawCode .replace(/<\/div>$/, `${lineNumbersWrapperCode}`) - .replace(/"(language-\w*)"/, '"$1 line-numbers-mode"') + .replace(/"(language-[-\w]*)"/, '"$1 line-numbers-mode"') return finalCode }