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

ReferenceError: token is not defined #1496

Closed
astronomersiva opened this issue Aug 22, 2018 · 0 comments · Fixed by #1499
Closed

ReferenceError: token is not defined #1496

astronomersiva opened this issue Aug 22, 2018 · 0 comments · Fixed by #1499
Milestone

Comments

@astronomersiva
Copy link

astronomersiva commented Aug 22, 2018

Description

I am getting the error message ReferenceError: token is not defined while running this on text that has NO-BREAK-SPACE character in the content.

Input

The code looked like this before beautification:

<p>hello world</p>

Expected Output

The code should have looked like this after beautification:

<p>hello world</p>

Actual Output

The code actually looked like this after beautification:

ReferenceError: token is not defined
    at Beautifier.beautify (/Users/siva/.nvm/versions/node/v8.11.3/lib/node_modules/js-beautify/js/src/html/beautifier.js:372:29)
    at style_html (/Users/siva/.nvm/versions/node/v8.11.3/lib/node_modules/js-beautify/js/src/html/index.js:33:21)
    at Function.style_html (/Users/siva/.nvm/versions/node/v8.11.3/lib/node_modules/js-beautify/js/src/index.js:36:10)
    at makePretty (/Users/siva/.nvm/versions/node/v8.11.3/lib/node_modules/js-beautify/js/lib/cli.js:448:36)
    at Object.processInputSync (/Users/siva/.nvm/versions/node/v8.11.3/lib/node_modules/js-beautify/js/lib/cli.js:442:5)
    at Array.forEach (<anonymous>)
    at Object.exports.interpret (/Users/siva/.nvm/versions/node/v8.11.3/lib/node_modules/js-beautify/js/lib/cli.js:305:15)
    at Object.<anonymous> (/Users/siva/.nvm/versions/node/v8.11.3/lib/node_modules/js-beautify/js/bin/js-beautify.js:4:5)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)

js-beautify version - 1.8.0-rc12

@bitwiseman bitwiseman added this to the 1.8.0 milestone Aug 22, 2018
bitwiseman added a commit to MacKLess/js-beautify that referenced this issue Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants