mirror of
https://github.com/vlang/v.git
synced 2025-09-14 23:12:33 +03:00
parser: fix multiline strings with CRLF endings for Linux
This commit is contained in:
parent
baeb2e3c0e
commit
acbca7584b
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue