Fix codeblock underscores with language

de91b395b01c1cc5a5ee7f02d7f0801c252e1299

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -1Showing whitespace changes
public/scripts/showdown-underscore.js+1 -1
@@ -8,7 +8,7 @@ export const markdownUnderscoreExt = () => {
88
9 return [{9 return [{
10 type: 'output',10 type: 'output',
11 regex: new RegExp('(<code>[\\s\\S]*?<\\/code>)|\\b(?<!_)_(?!_)(.*?)(?<!_)_(?!_)\\b', 'g'),11 regex: new RegExp('(<code(?:\\s+[^>]*)?>[\\s\\S]*?<\\/code>)|\\b(?<!_)_(?!_)(.*?)(?<!_)_(?!_)\\b', 'g'),
12 replace: function(match, codeContent, italicContent) {12 replace: function(match, codeContent, italicContent) {
13 if (codeContent) {13 if (codeContent) {
14 // If it's inside <code> tags, return unchanged14 // If it's inside <code> tags, return unchanged