Skip to content

Commit

Permalink
fix: do not consume braces in a string
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Aug 17, 2024
1 parent a8221b7 commit c83c27c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ bool tree_sitter_css_external_scanner_scan(void *payload, TSLexer *lexer, const
}
lexer->mark_end(lexer);
// We need a { to be a pseudo class selector, a ; indicates a property
while (lexer->lookahead != ';' && lexer->lookahead != '}' && !lexer->eof(lexer)) {
while (lexer->lookahead != ';' && lexer->lookahead != '\'' && lexer->lookahead != '}' &&
!lexer->eof(lexer)) {
advance(lexer);
if (lexer->lookahead == '{') {
lexer->result_symbol = PSEUDO_CLASS_SELECTOR_COLON;
Expand Down

0 comments on commit c83c27c

Please sign in to comment.