Skip to content
  • Philip Withnall's avatar
    gkeyfile: Fix parsing of new lines in comments · ff8b7316
    Philip Withnall authored
    
    
    Previously, the code which parsed comments in key files would append a
    line break to the comment where there was none before; this was part of
    the code for handling re-inserting line breaks into multi-line comments
    after removing the ‘#’ prefix. Now, we don’t add a terminal line break.
    
    This was slightly icky to implement because parse_value_as_comment() is
    called once for each line of a multi-line comment.
    
    This expands the existing test case to cover a single line comment, and
    also fixes the documentation to correctly state that the leading ‘#’
    *is* removed and mention the new line break behaviour.
    
    Signed-off-by: default avatarPhilip Withnall <withnall@endlessm.com>
    
    #107
    ff8b7316