Skip to content

Commit

Permalink
Fix bug with limiting blocquotes in ExpensiMark
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Mar 13, 2024
1 parent 7bfd55f commit e09c6e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ExpensiMark.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ export default class ExpensiMark {
const filterRules = ['heading1'];

// if we don't reach the max quote depth we allow the recursive call to process possible quote
if (this.currentQuoteDepth < this.maxQuoteDepth) {
if (this.currentQuoteDepth < this.maxQuoteDepth - 1) {
filterRules.push('quote');
this.currentQuoteDepth++;
}

const replacedText = this.replace(textToReplace, {filterRules, shouldEscapeText: false, shouldKeepRawInput});
this.currentQuoteDepth = 1;
this.currentQuoteDepth = 0;
return `<blockquote>${isStartingWithSpace ? ' ' : ''}${replacedText}</blockquote>`;
},
},
Expand Down

0 comments on commit e09c6e8

Please sign in to comment.