Revert underscore italics regex part

This commit is contained in:
Cohee 2024-08-20 11:03:40 +03:00
parent c70266984f
commit e3f010782d
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ export const markdownUnderscoreExt = () => {
return [{
type: 'output',
regex: new RegExp('(<code>[\\s\\S]*?<\\/code>)|(?<!\\S)_(?!_)([^_\\n]+?)(?<!_)_(?!\\w)', 'g'),
regex: new RegExp('(<code>[\\s\\S]*?<\\/code>)|\\b(?<!_)_(?!_)(.*?)(?<!_)_(?!_)\\b', 'g'),
replace: function(match, codeContent, italicContent) {
if (codeContent) {
// If it's inside <code> tags, return unchanged