gdritter repos config-ini / 2ac2483
parseIni: make newline after section heading explicit (fixes #4) This change makes it so that the newline following a section heading is explicitly expected. Prior to this change, sBlanks absorbed this newline and then it was preserved as part of the "comments" in the INI structure, but at serialize time, we were already explicitly re-introducing a newline after the section heading. This resulted in a duplicate newline after each section heading in the document. This change fixes that behavior so that the newline following a section heading is not considered part of the document content that we need to preserve. Jonathan Daugherty 6 years ago
1 changed file(s) with 1 addition(s) and 0 deletion(s). Collapse all Expand all
8787 void (char '[')
8888 name <- T.pack `fmap` some (noneOf "[]")
8989 void (char ']')
90 void eol
9091 comments <- sBlanks
9192 pPairs (T.strip name) start leading prevs comments Seq.empty
9293