misc: add space inside django tags in skeletons (#25706)

This commit is contained in:
Frédéric Péters 2019-03-06 20:16:28 +01:00
parent 8e262de57a
commit a03b9e6906
2 changed files with 5 additions and 5 deletions

View File

@ -120,16 +120,16 @@ def skeleton_extra_placeholder(parser, token):
if token.contents == 'end_skeleton_extra_placeholder':
break
if token.token_type == TOKEN_VAR:
text.append('{{')
text.append('{{ ')
elif token.token_type == TOKEN_BLOCK:
text.append('{%')
text.append('{% ')
elif token.token_type == TOKEN_COMMENT:
text.append('{# ')
text.append(token.contents)
if token.token_type == TOKEN_VAR:
text.append('}}')
text.append(' }}')
elif token.token_type == TOKEN_BLOCK:
text.append('%}')
text.append(' %}')
elif token.token_type == TOKEN_COMMENT:
text.append(' #}')

View File

@ -256,7 +256,7 @@ def test_page_skeleton(app):
assert 'Foobar' in resp.text
# check {% now %} inside a skeleton_extra_placeholder is not interpreted
assert '{%now' in resp.text
assert '{% now ' in resp.text
assert '{# generation time #}' in resp.text
# check cells in footer are present even if there's no redirection page