You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bundled Svelte grammar has cyclical includes — syntect consumers spin forever #4081
Sublime Text / VS Code tolerate these (their include walk is cycle-safe), but syntect's is not: MatchIter::next pushes the target context with no
"already on the stack?" check, so the context stack grows without bound and parse_line never returns.
Concretely: highlighting a five-byte line — /** — inside a Svelte diff
pins a core at 100 % forever. html / javascript / typescript / vue parse
the same input in < 10 ms; only svelte loops. It is neither line length nor
regex backtracking (capping oniguruma's retry_limit_in_match to 20 000 still
spins).
This is filed here (rather than only upstream) because two-face ships the
grammar, so every two-face user who highlights a Svelte file hits it. A
second, non-consuming-set loop in parse_line compounds it.
Activity