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

Deal with invisible chars #123

Open
markelog opened this issue Jun 10, 2016 · 3 comments
Open

Deal with invisible chars #123

markelog opened this issue Jun 10, 2016 · 3 comments
Labels

Comments

@markelog
Copy link
Member

Like BOM - https://en.wikipedia.org/wiki/Byte_order_mark, now they marked as a whitespace, it seems we just need to miss them

@mattiasrunge
Copy link

+1 to get this fixed, it used to work fine before upgrading to version 3

@markelog markelog added the bug label Nov 8, 2016
@cashburn
Copy link

cashburn commented Jul 20, 2017

I would also like to see this fixed, although I believe it's partially a problem in Babylon. In Babylon, they tokenize the JS, but if there is a BOM at the beginning of the file, the first token starts at index 1. Then in cst (elementTree.js: 163), anything between the last token (nothing) and the next token (first token) is made into a whitespace token. So there's a whitespace token with only an invisible character as the first token, then the next token is where it actually starts. So, at that point, cst could ignore/throw away the BOM, label it as another token, or keep labeling it as whitespace and let the users deal with it. I almost made a pull request, but I wasn't sure what the devs wanted to do about it, so I ended up just making a temporary change in JSCS, referenced in the JSCS issue above.

@markelog
Copy link
Member Author

markelog commented Jul 20, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants