jm / toml

Parse TOML. Like a bawss.
MIT License
151 stars 38 forks source link

Comments with no space are parsed incorrectly #32

Open JasperTimm opened 9 years ago

JasperTimm commented 9 years ago

It seems like the parser is having trouble with comments which are not followed by spaces before the next value. See below:

>> TOML.load("Host = 6")
=> {"Host"=>6}
>> TOML.load("#Host = 6")
=> {"#Host"=>6}
>> TOML.load("#\nHost = 6")
=> {"#\nHost"=>6}
>> TOML.load("#\nHost = 6")
=> {"#\nHost"=>6}
>> TOML.load("#\n Host = 6")
=> {"Host"=>6}
>> TOML.load("# \nHost = 6")
=> {"Host"=>6}
parkr commented 9 years ago

Weird! @BurntSushi, do you have a test for this in toml-test?