diff options
author | ianb <devnull@localhost> | 2008-11-22 17:47:07 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2008-11-22 17:47:07 +0000 |
commit | 6651d6c7e59e141829045fe733103f255a9eb776 (patch) | |
tree | 45e07571f367cdafee3ca80abe18db92acada317 /tests | |
parent | ca8c5c11d97ede79fc869d3a8ca7bdb4cd76301c (diff) | |
download | tempita-6651d6c7e59e141829045fe733103f255a9eb776.tar.gz |
Fix whitespace stripping for statements at the beginning and end of the template
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_template.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_template.txt b/tests/test_template.txt index 7481aaa..ec2bd75 100644 --- a/tests/test_template.txt +++ b/tests/test_template.txt @@ -119,6 +119,8 @@ contains a directive/statement (if/for, etc):: 'x=1\n' >>> sub('{{if 1}}\nx={{x}}\n{{endif}}\n', x=1) 'x=1\n' + >>> sub(' {{if 1}} \nx={{x}}\n {{endif}} \n', x=1) + 'x=1\n' There is a special directive that will create a default value for a variable, if no value is given:: @@ -160,8 +162,7 @@ Then we'll define a template that inherits:: ... ''') >>> print tmpl.substitute(master='test').strip() This is the parent test. The block: some text - Then the body: - Hi there! + Then the body: Hi there! >>> tmpl2 = Template('''\ ... {{def block(arg='hi_'+master):}}hey {{master}}: {{arg}}{{enddef}} ... ''', get_template=get_template, default_inherit='super_test') |