summaryrefslogtreecommitdiffstats
path: root/libgo/go/template/parse/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/template/parse/parse.go')
-rw-r--r--libgo/go/template/parse/parse.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/libgo/go/template/parse/parse.go b/libgo/go/template/parse/parse.go
index 6918074664e..9934d8221db 100644
--- a/libgo/go/template/parse/parse.go
+++ b/libgo/go/template/parse/parse.go
@@ -145,10 +145,11 @@ func (t *Tree) atEOF() bool {
}
// Parse parses the template definition string to construct an internal
-// representation of the template for execution.
-func (t *Tree) Parse(s string, funcs ...map[string]interface{}) (tree *Tree, err os.Error) {
+// representation of the template for execution. If either action delimiter
+// string is empty, the default ("{{" or "}}") is used.
+func (t *Tree) Parse(s, leftDelim, rightDelim string, funcs ...map[string]interface{}) (tree *Tree, err os.Error) {
defer t.recover(&err)
- t.startParse(funcs, lex(t.Name, s))
+ t.startParse(funcs, lex(t.Name, s, leftDelim, rightDelim))
t.parse(true)
t.stopParse()
return t, nil
OpenPOWER on IntegriCloud