logoalt Hacker News

pwdisswordfishqlast Tuesday at 1:06 PM1 replyview on HN

The systemd dialect of INI is actually pretty well-defined though.

https://www.freedesktop.org/software/systemd/man/latest/syst...


Replies

silvestrovyesterday at 10:31 AM

I'd really like a collection of unit tests for parsers. There is a lot of details that can differ between parsers.

E.g. in "Section C" the resulting KeyThree is "value 3▵▵▵▵▵▵▵value 3 continued" where each "▵" symbol is a space.

I think most people would expect a single (or no) space here.

I would guess that most software would strip the comments in SectionC or rearrange the output so that it will result in a diff even when nothing in SectionC changed.

So if you edit the file by hand in the same style as shown in the examples, then most editors would not be able to make a minor edit without making a large diff as many sections would be formatted differently.