From acbca7584bad821c828bedde0c2a2f30e9663f81 Mon Sep 17 00:00:00 2001 From: Toby Webb Date: Sat, 12 Oct 2019 03:48:26 +0200 Subject: [PATCH] parser: fix multiline strings with CRLF endings for Linux --- compiler/parser.v | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/parser.v b/compiler/parser.v index 8a01456130..a9c2ad96cd 100644 --- a/compiler/parser.v +++ b/compiler/parser.v @@ -2814,9 +2814,7 @@ fn (p mut Parser) char_expr() { fn format_str(_str string) string { // TODO don't call replace 3 times for every string, do this in scanner.v mut str := _str.replace('"', '\\"') - $if windows { - str = str.replace('\r\n', '\\n') - } + str = str.replace('\r\n', '\\n') str = str.replace('\n', '\\n') return str }