Skip to content

Commit

Permalink
fix: detecting pi_content's end should return true (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq authored Aug 10, 2023
1 parent d635497 commit 845fd8d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions common/scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,17 @@ static bool scan_pi_content(TSLexer *lexer) {

if (lexer->lookahead == '>') {
advance(lexer);
return false;
while (lexer->lookahead == ' ') advance(lexer);
if (lexer->lookahead == '\n') {
advance(lexer);
} else {
return false;
}
lexer->result_symbol = PI_CONTENT;
return true;
}

lexer->result_symbol = PI_CONTENT;
return true;
return false;
}

/// Scan for a Comment node
Expand Down

0 comments on commit 845fd8d

Please sign in to comment.