1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Windows: another \r\n fix

This commit is contained in:
Alexander Medvednikov 2019-06-29 21:31:13 +02:00
parent 18525922fd
commit 1bcf94f7f4

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
}