1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 14:10:49 +00:00

update tempalte's regexp

This commit is contained in:
astaxie 2013-09-12 18:20:29 +08:00
parent de2dd6e070
commit 55fe3ba52f

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 {