From 55fe3ba52f3664c9db25a6d4cdf1e0751fa69536 Mon Sep 17 00:00:00 2001 From: astaxie Date: Thu, 12 Sep 2013 18:20:29 +0800 Subject: [PATCH] update tempalte's regexp --- template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.go b/template.go index 51d4a364..88224830 100644 --- a/template.go +++ b/template.go @@ -132,7 +132,7 @@ func getTplDeep(root, file string, t *template.Template) (*template.Template, er if err != nil { return nil, err } - reg := regexp.MustCompile("{{template \"(.+)\"") + reg := regexp.MustCompile("{{[ ]*template[ ]+\"([^\"]+)\"") allsub := reg.FindAllStringSubmatch(string(data), -1) for _, m := range allsub { if len(m) == 2 {