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

Remove unicode char to the code #116

Closed
aelbore opened this issue May 17, 2020 · 1 comment
Closed

Remove unicode char to the code #116

aelbore opened this issue May 17, 2020 · 1 comment

Comments

@aelbore
Copy link

aelbore commented May 17, 2020

  • having unicode in the code transform or build stops and have exceptions.
    sample of code with unicode (Please see attached file)
  • is this scope of esbuild? or this could be done in the one who will use the esbuild?
  • i did some string replace to my code str.replace(/[^\0-~]/g, ' ')

Screenshot 2020-05-17 at 11 30 03 AM

@evanw
Copy link
Owner

evanw commented May 17, 2020

Thanks for the report. This is a bug in esbuild. It looks like I need to handle these unusual whitespace characters as whitespace. In the meantime you should be able to do something like str.replace(/[^\S\r\n]/g,' ').

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

No branches or pull requests

2 participants