-
Notifications
You must be signed in to change notification settings - Fork 142
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
Hang while highlighting JavaScript using Packages#v4050 #460
Comments
4050 is already using branch points |
Hmmm, it would be nice if that gave an error while loading. In any case it seems like an incorrect syntax file shouldn't allow infinite processing to occur, and this code snippet shouldn't be hitting the branch point. |
Good point :) I have narrowed it down to the |
@keith-hall would you mind explaining why bat doesn't suffer from this problem? Delta uses bat's highlighting assets and is suffering from it. |
I'm not convinced that echo -e 'export async function go_to_bar(bar_no) {\n foo = bar_no\n /*\n testing123\n */\n}\n' | ~/repos/bat/target/release/bat -l JavaScript hangs, and when I press Ctrl+C, I get the following output:
|
IIRC when trying to determine that too I realised that |
Thanks @keith-hall and @Nemo157! |
When attempting to highlight some JS code we noticed that it would never return and just spin consuming a full core. We're using
syntect
with a custom pack built from mostly https://github.com/sublimehq/Packages/releases/tag/v4050. The code:This hangs while parsing the
/*
line. I've pushed a complete testcase, but since this requires a newer version ofsublimehq/Packages
than currently tested against I expect that this would need a smaller syntax file to be synthesized for a proper testcase.The text was updated successfully, but these errors were encountered: