Fix minor crash for certain oddly formed *.js files#2128
Fix minor crash for certain oddly formed *.js files#2128bitwiseman merged 5 commits intobeautifier:mainfrom
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