]> Cypherpunks repositories - gostls13.git/commitdiff
exp/template: document that comments may span newlines.
authorRob Pike <r@golang.org>
Mon, 8 Aug 2011 13:42:49 +0000 (23:42 +1000)
committerRob Pike <r@golang.org>
Mon, 8 Aug 2011 13:42:49 +0000 (23:42 +1000)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4855045

src/pkg/exp/template/doc.go

index 796bc9d476246d77e528b2f6723dfedcba9a0e35..ef9e1563b950a23de555729409e7f0c06a187245 100644 (file)
@@ -16,7 +16,7 @@ structure as execution proceeds.
 The input text for a template is UTF-8-encoded text in any format.
 "Actions"--data evaluations or control structures--are delimited by
 "{{" and "}}"; all text outside actions is copied to the output unchanged.
-Actions may not span newlines.
+Actions may not span newlines, although comments can.
 
 Once constructed, templates and template sets can be executed safely in
 parallel.
@@ -28,7 +28,8 @@ data, defined in detail below.
 
 */
 //     {{/* a comment */}}
-//             A comment; discarded. Comments do not nest.
+//             A comment; discarded. May contain newlines.
+//             Comments do not nest.
 /*
 
        {{pipeline}}