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

Wrong location displayed in the error message caused by a control character #509

Open
scivola opened this issue Jul 8, 2021 · 0 comments

Comments

@scivola
Copy link

scivola commented Jul 8, 2021

Reproduciton code:

require "yaml"
YAML.load %(foo:\n  - "x\u000Cy")

The above YAML text has a control character U+000C, which is not allowed.
The code gives the following error message:

(<unknown>): control characters are not allowed at line 1 column 1 (Psych::SyntaxError)

Though the character is at line 2 column 7, the reported location is line 1 column 1.
It confuses us.

If it is very difficult to display the correct location, I think it is better to display somewhere!

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

No branches or pull requests

1 participant