Closed GerwinBosch closed 2 months ago
That reproduction repo is using ancient 0.x versions of @lezer and @codemirror packages. Does the problem still occur if you use current versions?
Oops, good point (I missed that -.-). I've updated the dependencies in the fork and can confirm the issue is still reproducible.
Thanks for the comprehensive reproduction code! I was able to isolate it and found a fix, which is implemented in attached patch.
Hey, @TriplyDB we're working with CM and lezer for our SPARQL editor. However, we've encountered an issue when we introduce a lot of comments within large queries.
Our issue is that when, within a large document, tokens after/within an uncertain amount of skip-tokens when you uncomment a syntactically valid line, the parsing seems to fail (indicated by the validation and highlighting not working). Uncommenting the first comment token doesn't cause this issue. Any below do.
cm6-comment-parse-issue.webm
Luckily, I encountered #24 and its minimal reproduction was also able to reproduce our current problem. I've forked, updated the dependencies and tweaked the description to match our issue. The fork can be found here