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

SyntaxErrors on sourcecode with &NBSP whitespace when CommonJS is enabled #1396

Open
p-bakker opened this issue Oct 13, 2023 · 0 comments
Open
Labels
bug Issues considered a bug CommonJS Issues related to the CommonJS implementation in Rhino

Comments

@p-bakker
Copy link
Collaborator

p-bakker commented Oct 13, 2023

Executing a file with the content below when CommonJS is enabled throws a SyntaxError, whereas the same file parses and executes just fine when CommonJS is not enabled

// test.js
for (;;) {if (true) {break}} // whitespace inbetween (true) and {break} is a  

Tested with the Shell:

  • FAILS: java -jar rhino-1.7.14.jar -require -modules . test.js
  • WORKS: java -jar rhino-1.7.14.jar test.js

Note: to get the code with the actual  , select the text and then use Quote reply option to get the actual markdown source

@p-bakker p-bakker added CommonJS Issues related to the CommonJS implementation in Rhino bug Issues considered a bug labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues considered a bug CommonJS Issues related to the CommonJS implementation in Rhino
Projects
None yet
Development

No branches or pull requests

1 participant