Skip to content
Snippets Groups Projects
Commit af2850a8 authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

mkexp: re-enabled Jinja statement and comment syntax, now using '__mkexp__' keyword

parent 62415576
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,8 @@ Global
* Fixed test suite to clean up all temporary files
* Fixed tool 'cppath' to not choke when called twice on the same directory
* Changed 'set' test to work, and return False, on undefined variables
* Re-enabled Jinja statement and comment syntax, now using '__mkexp__' keyword
({%__mkexp__ ... %}, {#__mkexp__ ... #})
Release 1.0.1
=============
......
......@@ -302,8 +302,8 @@ template_env = Environment(
variable_end_string = '}',
line_statement_prefix = '#%',
line_comment_prefix = '#%#',
block_start_string = '{%DiSaBlEdAnDuNlIkElY',
comment_start_string = '{#DiSaBlEdAnDuNlIkElY',
block_start_string = '{%__mkexp__',
comment_start_string = '{#__mkexp__',
extensions=['jinja2.ext.do']
)
......
......@@ -701,5 +701,25 @@ class GetTemplatesTestCase(MkexpSimpleTestCase):
EXP_ID = """+other_exp_id+"""
""")
class DelimiterTestCase(MkexpSimpleTestCase):
def test_statement(self):
self.run_test("""
{%__mkexp__
set x = 'Hello, world!'
%}
%{x}
""", """
Hello, world!
""")
def test_comment(self):
self.run_test("""
{#__mkexp__
Now you see me - now you don't
#}
""", """
""")
if __name__ == '__main__':
unittest.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment