diff options
| author | Yip Coekjan <69834864+Coekjan@users.noreply.github.com> | 2024-08-16 03:53:15 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-15 19:53:15 +0000 |
| commit | ccd45241061be149687aec04db43dec96d8a961d (patch) | |
| tree | 655412b00ef7072427956996e1eb4540e17459dc /crates | |
| parent | 351bac8b688ea0f3161e268a04192a6546f2703a (diff) | |
Fix lexer on sth followed by comments (#4739)
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-syntax/src/lexer.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/typst-syntax/src/lexer.rs b/crates/typst-syntax/src/lexer.rs index 92e78b2d..721225c6 100644 --- a/crates/typst-syntax/src/lexer.rs +++ b/crates/typst-syntax/src/lexer.rs @@ -503,7 +503,10 @@ impl Lexer<'_> { } fn space_or_end(&self) -> bool { - self.s.done() || self.s.at(char::is_whitespace) + self.s.done() + || self.s.at(char::is_whitespace) + || self.s.at("//") + || self.s.at("/*") } } |
