magiconair / properties

Java properties scanner for Go
BSD 2-Clause "Simplified" License
323 stars 77 forks source link

Trailing comments are not preserved #45

Open glyn opened 4 years ago

glyn commented 4 years ago

The README states:

Comments and the order of keys are preserved.

However, comments at the end of a properties file are not preserved. See https://github.com/magiconair/properties/pull/44 for a failing test.

Note that the example properties file shown in wikipedia has a trailing comment, so trailing comments are certainly valid.

A special, degenerate case of trailing comments is a properties file consisting of comments alone.