aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/text/template/parse/parse.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2011-11-28 10:42:57 -0800
committerRob Pike <r@golang.org>2011-11-28 10:42:57 -0800
commit5f6027e9ad9a6f115399a93c5d330cbf2d66e85f (patch)
tree89053146db61fdbd3700602affc079f56d7a8dc6 /src/pkg/text/template/parse/parse.go
parent356b8ee26fa02643b166ae77870e24293260ba90 (diff)
downloadgo-5f6027e9ad9a6f115399a93c5d330cbf2d66e85f.tar.xz
text/template: address a couple of issues for html/template
- allow Lookup to work on uninitialized templates - fix bug in add: can't error after parser is stopped - add Add method for html/template R=adg, rogpeppe, r, rsc CC=golang-dev https://golang.org/cl/5436080
Diffstat (limited to 'src/pkg/text/template/parse/parse.go')
-rw-r--r--src/pkg/text/template/parse/parse.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/text/template/parse/parse.go b/src/pkg/text/template/parse/parse.go
index 36c54032ac..346f613b04 100644
--- a/src/pkg/text/template/parse/parse.go
+++ b/src/pkg/text/template/parse/parse.go
@@ -170,8 +170,8 @@ func (t *Tree) Parse(s, leftDelim, rightDelim string, treeSet map[string]*Tree,
defer t.recover(&err)
t.startParse(funcs, lex(t.Name, s, leftDelim, rightDelim))
t.parse(treeSet)
- t.stopParse()
t.add(treeSet)
+ t.stopParse()
return t, nil
}