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
8ff50e0b
Commit
8ff50e0b
authored
Jan 01, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed the "delims" argument from a RenderEngine method.
parent
7826ec7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
pystache/renderengine.py
+10
-7
No files found.
pystache/renderengine.py
View file @
8ff50e0b
...
...
@@ -12,6 +12,8 @@ import re
import
types
DEFAULT_TAG_OPENING
=
'{{'
DEFAULT_TAG_CLOSING
=
'}}'
END_OF_LINE_CHARACTERS
=
[
'
\r
'
,
'
\n
'
]
...
...
@@ -103,8 +105,8 @@ class RenderEngine(object):
tag_re
=
None
otag
=
'{{'
ctag
=
'}}'
otag
=
DEFAULT_TAG_OPENING
ctag
=
DEFAULT_TAG_CLOSING
def
__init__
(
self
,
load_partial
=
None
,
literal
=
None
,
escape
=
None
):
"""
...
...
@@ -270,12 +272,13 @@ class RenderEngine(object):
return
''
.
join
(
parts
)
return
func
def
parse_string_to_tree
(
self
,
template_string
,
delims
=
(
'{{'
,
'}}'
)
):
def
parse_string_to_tree
(
self
,
template_string
,
delims
=
None
):
engine
=
RenderEngine
(
load_partial
=
self
.
load_partial
,
literal
=
self
.
literal
,
escape
=
self
.
escape
)
engine
.
otag
=
delims
[
0
]
engine
.
ctag
=
delims
[
1
]
if
delims
is
not
None
:
engine
.
otag
=
delims
[
0
]
engine
.
ctag
=
delims
[
1
]
engine
.
_compile_regexps
()
...
...
@@ -376,7 +379,7 @@ class RenderEngine(object):
return
end_index
def
render_template
(
self
,
template
,
context
,
delims
=
(
'{{'
,
'}}'
)
):
def
render_template
(
self
,
template
,
context
):
"""
Arguments:
...
...
@@ -387,6 +390,6 @@ class RenderEngine(object):
if
type
(
template
)
is
not
unicode
:
raise
Exception
(
"Argument 'template' not unicode:
%
s:
%
s"
%
(
type
(
template
),
repr
(
template
)))
parse_tree
=
self
.
parse_string_to_tree
(
template_string
=
template
,
delims
=
delims
)
parse_tree
=
self
.
parse_string_to_tree
(
template_string
=
template
)
return
render_parse_tree
(
parse_tree
,
context
,
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