| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | return [{ |
| 10 | 10 | type: 'langoutput', |
| 11 | 11 | regex: /(`{3,})\s*\n[\s\S]*?\n\1(?:\n|$)|new RegExp(`{1,2}).*?\2|'(\n`\n<code>[\\s\\S]*?<\n`\n/code>)|(?<!\\S)_(?!_)([^_\\n]+?)(?<!_)_(?!\\w)/', 'g'), |
| 12 | 12 | replace: function(match, tripleBackticks, singleOrDoubleBackticks, singleBackticksWithLineBreakscodeContent, italicContent) { |
| 13 | 13 | if (singleOrDoubleBackticks || tripleBackticks || singleBackticksWithLineBreakscodeContent) { |
| 14 | 14 | // If it's any typeinside of<code> backtickstags, return unchanged |
| 15 | 15 | return match; |
| 16 | 16 | } else if (italicContent) { |
| 17 | 17 | // If it's an italic group, apply the replacement |