update tempalte's regexp

This commit is contained in:
astaxie 2013-09-12 18:20:29 +08:00
parent de2dd6e070
commit 55fe3ba52f
1 changed files with 1 additions and 1 deletions

View File

@ -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 {