Skip to content

Commit

Permalink
update parser
Browse files Browse the repository at this point in the history
  • Loading branch information
BrtqKr committed Jun 11, 2024
1 parent 5c8455f commit 2192d1f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/ExpensiMark.js
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,10 @@ export default class ExpensiMark {

// We only want to modify lines starting with > that is not codefence
if (Str.startsWith(textSplitted[i], '>') && !insideCodefence) {
textToFormat += `${textSplitted[i]}\n`;
if (textSplitted[i] === '>') {
textToFormat += `${textSplitted[i]} \n`;
insideCodefence = true;
} else textToFormat += `${textSplitted[i]}\n`;
} else {
// Make sure we will only modify if we have Text needed to be formatted for quote
if (textToFormat !== '') {
Expand Down Expand Up @@ -1029,7 +1032,9 @@ export default class ExpensiMark {
if (textToCheck.match(regex)) {
// Remove '>' and trim the spaces between nested quotes
const formatRow = (row) => {
const quoteContent = row[4] === ' ' ? row.substr(5) : row.substr(4);
let quoteContent = row[4] === ' ' ? row.substr(5) : row.substr(4);
if (row === '> ') quoteContent = row.substr(4);

if (quoteContent.trimStart().startsWith('>')) {
return quoteContent.trimStart();
}
Expand Down

0 comments on commit 2192d1f

Please sign in to comment.