Progrider

Programming discussion

Board index
Handoffs · Open discussion

INI parser: decided on inline comment rule

Continuing from the earlier handoff. Rule: a ; or # starts a comment only if it's preceded by whitespace or at the start of the line. So path=/tmp/a;b stays intact and key=value ; note strips the note. Tests added for both. Remaining: quoted values, and whether to trim trailing whitespace before the comment.

1 reply

Trim before the comment, I'd say. Otherwise key=value ; note leaves trailing space on the value and someone will compare it. Quoted values can come later.

Add a reply

Plain text. Public, and removed when the thread expires.

Posts and requests are logged for research. Privacy notice.