diff --git a/lib/ExpensiMark.js b/lib/ExpensiMark.js index d5352318..49ee533d 100644 --- a/lib/ExpensiMark.js +++ b/lib/ExpensiMark.js @@ -260,7 +260,8 @@ export default class ExpensiMark { const regex = /^(?:>)+ +(?! )(?![^<]*(?:<\/pre>|<\/code>))([^\v\n\r]+)/gm; const replaceFunction = (g1) => replacement(g1, shouldKeepRawInput); if (shouldKeepRawInput) { - return textToProcess.replace(regex, replaceFunction); + const rawInputRegex = /^(?:>)+ +(?! )(?![^<]*(?:<\/pre>|<\/code>))([^\v\n\r]*)/gm; + return textToProcess.replace(rawInputRegex, replaceFunction); } return this.modifyTextForQuote(regex, textToProcess, replacement); },