1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 19:30:55 +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 { if err != nil {
return nil, err return nil, err
} }
reg := regexp.MustCompile("{{template \"(.+)\"") reg := regexp.MustCompile("{{[ ]*template[ ]+\"([^\"]+)\"")
allsub := reg.FindAllStringSubmatch(string(data), -1) allsub := reg.FindAllStringSubmatch(string(data), -1)
for _, m := range allsub { for _, m := range allsub {
if len(m) == 2 { if len(m) == 2 {