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.