parsecfg: retain CRLF line breaks, fixes #12970 (#12971)

This commit is contained in:
Simon Krauter
2019-12-29 15:39:48 +01:00
committed by Andreas Rumpf
parent 8c19372690
commit 37e93eab66

View File

@@ -492,12 +492,12 @@ proc replace(s: string): string =
while i < s.len():
if s[i] == '\\':
d.add(r"\\")
elif s[i] == '\c' and s[i+1] == '\L':
d.add(r"\n")
elif s[i] == '\c' and s[i+1] == '\l':
d.add(r"\c\l")
inc(i)
elif s[i] == '\c':
d.add(r"\n")
elif s[i] == '\L':
elif s[i] == '\l':
d.add(r"\n")
else:
d.add(s[i])