mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-09 21:28:39 +01:00
Fix CRLF being significant inside of strings, now strings are normalized to \n only and the same output regardless of the file line endings (see #988)
https://github.com/wren-lang/wren/issues/988#issuecomment-842670624
This commit is contained in:
@ -911,6 +911,8 @@ static void readRawString(Parser* parser)
|
||||
char c1 = peekChar(parser);
|
||||
char c2 = peekNextChar(parser);
|
||||
|
||||
if (c == '\r') continue;
|
||||
|
||||
if(c == '\n') {
|
||||
lastNewline = string.count;
|
||||
skipEnd = lastNewline;
|
||||
@ -975,6 +977,7 @@ static void readString(Parser* parser)
|
||||
{
|
||||
char c = nextChar(parser);
|
||||
if (c == '"') break;
|
||||
if (c == '\r') continue;
|
||||
|
||||
if (c == '\0')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user