aboutsummaryrefslogtreecommitdiff
path: root/src/text/template/exec.go
diff options
context:
space:
mode:
authorAriel Mashraki <ariel@mashraki.co.il>2020-04-22 22:17:56 +0300
committerDaniel Martí <mvdan@mvdan.cc>2020-08-28 21:45:12 +0000
commitc8ea03828b0645b1fd5725888e44873b75fcfbb6 (patch)
treee6ce023202b96a0474d88bcf7eb6befa9f950ab0 /src/text/template/exec.go
parenta58a8d2e97d605f9f115a0e77ba09cd36bb82ba6 (diff)
downloadgo-c8ea03828b0645b1fd5725888e44873b75fcfbb6.tar.xz
text/template: add CommentNode to template parse tree
Fixes #34652 Change-Id: Icf6e3eda593fed826736f34f95a9d66f5450cc98 Reviewed-on: https://go-review.googlesource.com/c/go/+/229398 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/text/template/exec.go')
-rw-r--r--src/text/template/exec.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/text/template/exec.go b/src/text/template/exec.go
index ac3e741390..7ac5175006 100644
--- a/src/text/template/exec.go
+++ b/src/text/template/exec.go
@@ -256,6 +256,7 @@ func (s *state) walk(dot reflect.Value, node parse.Node) {
if len(node.Pipe.Decl) == 0 {
s.printValue(node, val)
}
+ case *parse.CommentNode:
case *parse.IfNode:
s.walkIfOrWith(parse.NodeIf, dot, node.Pipe, node.List, node.ElseList)
case *parse.ListNode: