Skip to content

Commit

Permalink
fix(build): update language regex for line number class (#1108)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Aug 3, 2022
1 parent 70b3060 commit 708c361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/markdown/plugins/lineNumbers.ts
Expand Up @@ -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-[-\w]*)"/, '"$1 line-numbers-mode"')

return finalCode
}
Expand Down

0 comments on commit 708c361

Please sign in to comment.