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

tests/example.toml does not parse #254

Closed
cies opened this issue Oct 17, 2014 · 2 comments
Closed

tests/example.toml does not parse #254

cies opened this issue Oct 17, 2014 · 2 comments

Comments

@cies
Copy link
Contributor

cies commented Oct 17, 2014

The spec says:

# DO NOT DO THIS EITHER

[a]
b = 1

[a.b]
c = 2

Yet example.toml contains:

[servers]

  # You can indent as you please. Tabs or spaces. TOML don't care.
  [servers.alpha]

My parser currently rejects example.toml as valid TOML.

Is that correct?

Or is indentation important after all?

@dhardy
Copy link

dhardy commented Oct 17, 2014

The example it says do not do is because it defines b under [a] and it defines [a.b]. Presumably some people might want to map both to a.b or something after parsing.

The second example has no such conflicts, so it is valid (not invalid).

I don't think it was the original intention that indentation matters, and it makes no sense to me that it should.

@BurntSushi
Copy link
Member

@dhardy is right. Indentation is not significant.

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

No branches or pull requests

3 participants