fix(build): line numbers mode when language specifier has symbol (#1353)

pull/1372/head
sun0day 2 years ago committed by GitHub
parent 50f4105752
commit 9c04a10c4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,7 +21,7 @@ export const lineNumberPlugin = (md: MarkdownIt) => {
const finalCode = rawCode
.replace(/<\/div>$/, `${lineNumbersWrapperCode}</div>`)
.replace(/"(language-[-\w]*)"/, '"$1 line-numbers-mode"')
.replace(/"(language-\S*?)"/, '"$1 line-numbers-mode"')
return finalCode
}

Loading…
Cancel
Save