-
Notifications
You must be signed in to change notification settings - Fork 140
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
Support indentation w/ 2 spaces #101
Comments
http://yaml.org/spec/1.2/spec.html#id2777534 The YAML 1.2 spec says that any number of spaces can be used to represent an indentation level. |
This has come up a few times in |
|
I don't think this is true, as I commented on clap-rs/clap#965 already. I also have some tests that should demonstrate this. Or do I not understand correctly? |
@hoodie I agree the specific test referenced in clap#965 doesn't quite line up with this issue, however just today I ran into an issue where the only change made was indents from 4 to 2 and it works with 4 but fails with 2. Once I get to a computer I can post the actual test for reference. |
Just ran into this today via Clap. Having a background with Rails and Jekyll, I wrote my Clap yaml with two spaces for indentation and then was beat over the head with weird issues where the yaml would fail to parse. Took some digging and found out that indentation by two spaces is what killed me. Given that every other yaml parser I've used hasn't cared about the number of spaces present, but rather the number of spaces relative to the parent, I'd love to see this functionality added! Especially of note here, most editors default to two spaces for indentation in yaml, since that's become the de-facto standard for yaml writers/consumers, which could really exacerbate the issue in Rust projects. |
It appears that yaml-rust only supports 4 spaces for indentation.
The text was updated successfully, but these errors were encountered: