Toml: Replace single-letter-key examples

Created on 19 Aug 2019  路  3Comments  路  Source: toml-lang/toml

In the readme, is this a typo:


As long as a key hasn't been directly defined, you may still write to it and to names within it.

a.b.c = 1

a.d = 2

Should that last line instead be a.b?

clarification

Most helpful comment

You might consider using longer names here to make them less easily mistakable for a typo

Yup. Sounds like a plan. :)

All 3 comments

I see. I was confused. The example directly after it suggested to me that it might be an order-dependent thing. As in (incorrectly),

~~~

This is ok

a.b.c = 1
a.b = 2

but

THIS IS INVALID

a.b = 1
a.b.c = 2
~~~

You might consider using longer names here to make them less easily mistakable for a typo, for example:

~~~
fruit.apple.fuji = 1
fruit.pear = 2

But this is invalid:

fruit.apple = 1
fruit.apple.fuji = 2
~~~

You might consider using longer names here to make them less easily mistakable for a typo

Yup. Sounds like a plan. :)

If someone could file a PR to fix this, that'd be great! ^>^

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tamasfe picture tamasfe  路  3Comments

LongTengDao picture LongTengDao  路  4Comments

hukkin picture hukkin  路  4Comments

ChristianSi picture ChristianSi  路  4Comments

jdfergason picture jdfergason  路  4Comments