]> Cypherpunks repositories - gostls13.git/commitdiff
spec: skip carriage returns in raw literals
authorRob Pike <r@golang.org>
Thu, 15 Dec 2011 05:52:41 +0000 (21:52 -0800)
committerRob Pike <r@golang.org>
Thu, 15 Dec 2011 05:52:41 +0000 (21:52 -0800)
This change guarantees that whether the line ending convention
when the source is created includes carriage returns is irrelevant
to the value of the string. See issue 680.

The compilers do not yet implement this.

R=golang-dev, adg, r, gri, rsc, iant
CC=golang-dev
https://golang.org/cl/5491043

doc/go_spec.html

index 945caba9d99c28c1bcddbda2f192d973e9576474..015404041b3f3d7ed41f5cb55a5bf25671e8a30d 100644 (file)
@@ -1,5 +1,5 @@
 <!-- title The Go Programming Language Specification -->
-<!-- subtitle Version of December 13, 2011 -->
+<!-- subtitle Version of December 14, 2011 -->
 
 <!--
 TODO
@@ -454,6 +454,8 @@ back quote. The value of a raw string literal is the
 string composed of the uninterpreted characters between the quotes;
 in particular, backslashes have no special meaning and the string may
 span multiple lines.
+Carriage returns inside raw string literals
+are discarded from the raw string value.
 </p>
 <p>
 Interpreted string literals are character sequences between double