Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
6632c21d
Commit
6632c21d
authored
Nov 13, 2013
by
astaxie
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #287 from francoishill/patch-1
Update template.go
parents
ac6108a8
a5b5ae89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
template.go
template.go
+2
-2
No files found.
template.go
View file @
6632c21d
...
...
@@ -153,7 +153,7 @@ func getTplDeep(root, file, parent string, t *template.Template) (*template.Temp
if
err
!=
nil
{
return
nil
,
[][]
string
{},
err
}
reg
:=
regexp
.
MustCompile
(
"{{
[ ]*template[ ]+
\"
([^
\"
]+)
\"
"
)
reg
:=
regexp
.
MustCompile
(
TemplateLeft
+
"
[ ]*template[ ]+
\"
([^
\"
]+)
\"
"
)
allsub
:=
reg
.
FindAllStringSubmatch
(
string
(
data
),
-
1
)
for
_
,
m
:=
range
allsub
{
if
len
(
m
)
==
2
{
...
...
@@ -216,7 +216,7 @@ func _getTemplate(t0 *template.Template, root string, submods [][]string, others
if
err
!=
nil
{
continue
}
reg
:=
regexp
.
MustCompile
(
"{{
[ ]*define[ ]+
\"
([^
\"
]+)
\"
"
)
reg
:=
regexp
.
MustCompile
(
TemplateLeft
+
"
[ ]*define[ ]+
\"
([^
\"
]+)
\"
"
)
allsub
:=
reg
.
FindAllStringSubmatch
(
string
(
data
),
-
1
)
for
_
,
sub
:=
range
allsub
{
if
len
(
sub
)
==
2
&&
sub
[
1
]
==
m
[
1
]
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment