Skip to content

Commit

Permalink
Fix issue that breaks markdown after every line end
Browse files Browse the repository at this point in the history
  • Loading branch information
jarthana committed Jul 23, 2024
1 parent 46a697d commit 3713fc6
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,10 @@ protected final boolean scanForMarkdownBeginning() {
try {
int temp = this.currentPosition;
int count = 0;
// The scanner is already at \r, look for matching \n
if (this.currentCharacter == '\r' && this.source[temp] == '\n') {
temp++;
}
while(true) {
char c = this.source[temp++];
switch(c) {
Expand All @@ -580,7 +584,6 @@ protected final boolean scanForMarkdownBeginning() {
return true;
}
break;
case '\r' :
case '\n' :
return false;
default:
Expand Down Expand Up @@ -1953,6 +1956,9 @@ protected int getNextToken0() throws InvalidInputException {
pushLineSeparator();
}
}
if (!scanForMarkdownBeginning()) {
break;
}
}
isUnicode = false;
previous = this.currentPosition;
Expand Down Expand Up @@ -2847,6 +2853,9 @@ public final void jumpOverMethodBody() {
pushLineSeparator();
}
}
if (!scanForMarkdownBeginning()) {
break;
}
}
isUnicode = false;
previous = this.currentPosition;
Expand Down

0 comments on commit 3713fc6

Please sign in to comment.