Revert underscore italics regex part
This commit is contained in:
parent
c70266984f
commit
e3f010782d
|
@ -8,7 +8,7 @@ export const markdownUnderscoreExt = () => {
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
type: 'output',
|
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) {
|
replace: function(match, codeContent, italicContent) {
|
||||||
if (codeContent) {
|
if (codeContent) {
|
||||||
// If it's inside <code> tags, return unchanged
|
// If it's inside <code> tags, return unchanged
|
||||||
|
|
Loading…
Reference in New Issue