Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
Overview
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pystache_custom
Commits
c2500342
Commit
c2500342
authored
Dec 31, 2011
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed _parse() to parse_to_tree().
parent
269f12ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
pystache/template.py
+3
-3
No files found.
pystache/template.py
View file @
c2500342
...
...
@@ -37,7 +37,7 @@ def parse(template, view, delims=('{{', '}}')):
tmpl
.
view
=
view
tmpl
.
otag
,
tmpl
.
ctag
=
delims
tmpl
.
_compile_regexps
()
return
tmpl
.
_pars
e
(
template
)
return
tmpl
.
parse_to_tre
e
(
template
)
def
renderParseTree
(
parsed
,
view
,
template
):
n
=
len
(
parsed
)
...
...
@@ -133,7 +133,7 @@ class Template(object):
"""
self
.
tag_re
=
re
.
compile
(
tag
%
tags
,
re
.
M
|
re
.
X
)
def
_pars
e
(
self
,
template
,
index
=
0
):
def
parse_to_tre
e
(
self
,
template
,
index
=
0
):
"""Parse a template into a syntax tree."""
buffer
=
[]
...
...
@@ -191,7 +191,7 @@ class Template(object):
buffer
.
append
(
partialTag
(
name
,
captures
[
'whitespace'
]))
elif
captures
[
'tag'
]
in
[
'#'
,
'^'
]:
try
:
self
.
_pars
e
(
template
,
index
=
pos
)
self
.
parse_to_tre
e
(
template
,
index
=
pos
)
except
EndOfSection
as
e
:
bufr
=
e
.
buffer
tmpl
=
e
.
template
...
...
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