You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normalize line ending to \n in StringLiteralExprSyntax.representedLiteralValue
This matches the specification of multi-line string literal handling:
From https://docs.swift.org/swift-book/documentation/the-swift-programming-language/lexicalstructure/#String-Literals:
> Line breaks in a multiline string literal are normalized to use the line feed character. Even if your source file has a mix of carriage returns and line feeds, all of the line breaks in the string will be the same.
From https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170417/035923.html:
> The quoted string should normalize newlines to \n in the value of the literal, regardless of whether the source file uses \n (Unix), \r\n (Windows), or \r (classic Mac) line endings. Likewise, when the compiler strips the initial and final newline from the literal value, it will strip one of any of the \n, \r\n, or \r line-ending sequences from both ends of the literal.
0 commit comments