toml-lang / toml-test

A language agnostic test suite for TOML parsers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarify if - is permitted as a starting character in bare keys (toml 1.0.0)

auronandace opened this issue · comments

Looking through the spec and abnf I see that - is one of the permitted characters in a bare key.
Looking through the tests I see a test for using _ as a bare key but not one starting with -.

I understand in practice that it would be rare to find a bare key starting with - but it may be best to be explicit in showing that it is a valid possibility. I wonder if this is an edge case that some parsers may stumble on.

Sure, I added some tests for this.