-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Yaml parser #15674
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
Comments
It throws error because tabs are forbidden in the Yaml spec. On the other hand, unicode space-like chars are not forbidden |
@stof So this is expected behavior? Maybe parser need to understand space-like chars as spaces? |
@igormukhingmailcom the problem is that in Unicode charset there are a lot of space-like chars. The four common ones related to HTML entities are For this reason, I think we should close this issue as "won't fix" and always expect that the input data is well formatted with regular white spaces. However, maybe someone can think of an easy solution to this problem. |
@stof @javiereguiluz Maybe we can just previously replace all space-like chars to space at start of line? |
If I read http://www.yaml.org/spec/1.2/spec.html#space/indentation/ correctly, @igormukhingmailcom If you have to deal with broken YAML files, you might want to fix them before passing them to the YAML parser. |
@derrabus indeed you are right! The YAML spec is clear about this: only white spaces ( I guess it's clear now that we have to close this issue as "won't fix" for not being an actual error. @igormukhingmailcom I'm afraid that you'll have to "clean" the files before parsing them as Yaml. |
Hi.
Have next situation...
I've got yaml file from my colleague and this file parsed not successfully:
Parsed data:
So I have a look to this file and found that some looks-like-space characters is not spaces.
When I've converted this looks-like-space character into html code I've got
 
.(When I replaced it with spaces characters - all become work fine).
How can we prevent that situations... When parser see
tab
character - it throws error. Maybe we can also throw exceptions with another looks-like-space characters?Thank you.
The text was updated successfully, but these errors were encountered: