Windows: another \r\n fix

pull/816/head v0.1.10
Alexander Medvednikov 2019-06-29 21:31:13 +02:00
parent 18525922fd
commit 1bcf94f7f4
1 changed files with 6 additions and 1 deletions

View File

@ -2075,7 +2075,12 @@ fn (p mut Parser) char_expr() {
fn format_str(str string) string {
str = str.replace('"', '\\"')
str = str.replace('\n', '\\n')
$if windows {
str = str.replace('\r\n', '\\n')
}
$else {
str = str.replace('\n', '\\n')
}
return str
}