From: Rob Pike Date: Mon, 8 Aug 2011 13:42:49 +0000 (+1000) Subject: exp/template: document that comments may span newlines. X-Git-Tag: weekly.2011-08-10~16 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9c2ebab82686e31ec09b87a6cdb946a2ef2e1e2e;p=gostls13.git exp/template: document that comments may span newlines. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4855045 --- diff --git a/src/pkg/exp/template/doc.go b/src/pkg/exp/template/doc.go index 796bc9d476..ef9e1563b9 100644 --- a/src/pkg/exp/template/doc.go +++ b/src/pkg/exp/template/doc.go @@ -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}}