Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JavaScript] Fix infinite loop caused by diff conflict markers #4046

Merged

Conversation

deathaxe
Copy link
Collaborator

Addresses sublimehq/sublime_text#6498

This commit restricts JSX tag matching to avoid infinite loops, caused by invalid syntax, which is still recognized as potential JSX content, but may cause heavy backtracking due to unmatched tags.

With this commit < is expected to be followed by either a valid jsx-tag-name or tag-end punctuation on the same line to be consumed as jsx tag.

Addresses sublimehq/sublime_text#6498

This commit restricts JSX tag matching to avoid infinite loops, caused by
invalid syntax, which is still recognized as potential JSX content,
but may cause heavy backtracking due to unmatched tags.

With this commit `<` is expected to be followed by either a valid jsx-tag-name
or tag-end punctuation on the same line to be consumed as jsx tag.
@deathaxe deathaxe merged commit 8ea464d into sublimehq:master Oct 26, 2024
1 check passed
@deathaxe deathaxe deleted the pr/javascript/fix-diff-infiniteloop branch October 26, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants