-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix minor crash for certain oddly formed *.js files #2128
Conversation
Could you add a test with the input that crashes without this fix? |
Same problem here. This fix still works. |
@UlyssesWu |
https://github.com/beautify-web/js-beautify/files/10437339/Player.txt |
@PierceLBrooks
This input fails before this PR and succeeds with this change in place. |
@bitwiseman I forgot all about your original unit test request! My bad. ^ Does this suffice? Your unit test framework is unfamiliar to me unfortunately. |
The failure encountered by the https://github.com/beautifier/js-beautify/actions/runs/13642772279 CI run appears to have been on account of the issue manifesting not within the fixed Python code, but by the at-that-time-yet-to-be-fixed Javascript code's version of the same bug. This should now be resolved by https://github.com/beautifier/js-beautify/actions/runs/13643064944 |
Description
main
)Hello there! I recently discovered an interesting piece of apparent javascript code that I wanted to inspect further at https://www.scribd.com/document/512791356/Player - which has been attached here - and it was found that neither the https://beautifier.io/ web interface nor this python module could beautify the content without either hanging indefinitely or throwing an exception like this one below:
The beautification script I used can be located on this page... https://gist.github.com/PierceLBrooks/7a29d53f4915f847b82e41e2954ca000
Before Merge Checklist
These items can be completed after PR is created.
(Check any items that are not applicable (NA) for this PR)
Player.txt