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

Empty object has wrong range #275

Closed
evidolob opened this issue May 25, 2021 · 2 comments
Closed

Empty object has wrong range #275

evidolob opened this issue May 25, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@evidolob
Copy link

Describe the bug
YAMLMap has wrong range in case if it empty.

To Reproduce
Parse:

{



}

Root YAMLMap has always range: [ 0, 1, 1 ], it seems parser/lexer trims whitespaces/newlines inside {}.
Expected behaviour
Root YAMLMap should have proper range, and value-end, node-end should point to real map/object end.

Versions (please complete the following information):

  • Environment: Node.js 12.x
  • yaml: 2.0.0-5
@evidolob evidolob added the bug Something isn't working label May 25, 2021
@eemeli
Copy link
Owner

eemeli commented May 25, 2021

Thank you for reporting this! And thankfully it was pretty easy to fix too.

@eemeli eemeli closed this as completed May 25, 2021
@evidolob
Copy link
Author

@eemeli Thx for the fast fix, do you have plans to make a release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants