diff --git a/libs/tree-sitter-wing/src/scanner.c b/libs/tree-sitter-wing/src/scanner.c index ea204440754..87a5fca5280 100644 --- a/libs/tree-sitter-wing/src/scanner.c +++ b/libs/tree-sitter-wing/src/scanner.c @@ -169,8 +169,6 @@ static bool scan_automatic_block(TSLexer *lexer) return false; if (lexer->is_at_included_range_start(lexer)) return true; - if (lexer->lookahead == '\n') - break; if (!iswspace(lexer->lookahead)) return false; skip(lexer); diff --git a/libs/tree-sitter-wing/test/corpus/statements/statements.txt b/libs/tree-sitter-wing/test/corpus/statements/statements.txt index e78abdfb22e..4299969d74d 100644 --- a/libs/tree-sitter-wing/test/corpus/statements/statements.txt +++ b/libs/tree-sitter-wing/test/corpus/statements/statements.txt @@ -117,6 +117,22 @@ if false {} -------------------------------------------------------------------------------- +(source + (if_statement + condition: (bool) + block: (block))) + +================================================================================ +If Newline Block +================================================================================ + +if false +{ + +} + +-------------------------------------------------------------------------------- + (source (if_statement condition: (bool)