Repository navigation
Fix hang on block comment after an expression in JavaScript - #4091
Merged
keith-hall merged 2 commits intoOct 20, 2026
Merged
Conversation
cindykrafft
pushed a commit
to cindykrafft/bat
that referenced
this pull request
Oct 20, 2026
Resolve the CHANGELOG conflict by keeping the new sharkdp#4091 entry along with the filled-in sharkdp#4076 and sharkdp#4084 entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VVn4SeAXPsUajXT2rtHQfo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4080
printf 'a /*\n' | bat -l JavaScript(or a Svelte file with{a /* x */}) never returns. In the bundled JavaScript syntax,line_continuation_lookaheadtreats the/of/*as a division operator, so the parser keeps switching between two zero-widthsets and never moves forward (trishume/syntect#709).This adds a hunk to the existing
JavaScript.sublime-syntax.patchso/only counts as a continuation when it isn't followed by*. The fix is the one @aozmekik worked out in the issue; thanks for the investigation.Testing:
tests/syntax-tests/source/Svelte/comment_after_expression.svelte. A build without the patch hangs on it; with the patch it finishes immediately.regression_test.sh: no changes in any existing highlighted output.cargo test --lockedpasses.