1
0
mirror of https://github.com/golang/go synced 2024-11-24 21:10:04 -07:00

exp/template: document that comments may span newlines.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4855045
This commit is contained in:
Rob Pike 2011-08-08 23:42:49 +10:00
parent 54e9406ffb
commit 9c2ebab826

View File

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