Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
6632c21d
authored
2013-11-12 16:15:53 -0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #287 from francoishill/patch-1
Update template.go
2 parents
ac6108a8
a5b5ae89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
template.go
template.go
View file @
6632c21
...
...
@@ -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
Styling with
Markdown
is supported
Attach a file
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 post a comment