| 8 | | 8 | |
| 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 unchanged | 14 | // If it's inside <code> tags, return unchanged |