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

Nonbreaking space in template leads to hard-to-understand error message #85

Open
twbartel opened this issue Jan 10, 2019 · 0 comments
Open

Comments

@twbartel
Copy link
Collaborator

Explain the problem

When there is a nonbreaking space (unicode character code 160) in a template, the Melody parser will output an "Unknown token" error message. In the console, this usually looks like a normal space, this is why it's confusing.

Expected Behaviour

It might be good to test explicitly for the nonbreaking space, and inform the developer-user of it.

Actual Behaviour

"Unknown token" with the arrow pointing to what looks like a normal space.
nbsp-error

Steps to reproduce

Insert a nonbreaking space in any template and try to compile it.

Provide a repository that reproduces issue if possible

Provide your Environment details

  • Node version:

  • Operating System:

  • melody version:

@pago pago added this to the 1.2.0 milestone Jan 13, 2019
pago pushed a commit that referenced this issue Apr 23, 2019
* Throws better error for NBSP tokens [#85]

Co-Authored-By: byara <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants