misc: add space inside django tags in skeletons (#25706)
This commit is contained in:
parent
8e262de57a
commit
a03b9e6906
|
@ -120,16 +120,16 @@ def skeleton_extra_placeholder(parser, token):
|
||||||
if token.contents == 'end_skeleton_extra_placeholder':
|
if token.contents == 'end_skeleton_extra_placeholder':
|
||||||
break
|
break
|
||||||
if token.token_type == TOKEN_VAR:
|
if token.token_type == TOKEN_VAR:
|
||||||
text.append('{{')
|
text.append('{{ ')
|
||||||
elif token.token_type == TOKEN_BLOCK:
|
elif token.token_type == TOKEN_BLOCK:
|
||||||
text.append('{%')
|
text.append('{% ')
|
||||||
elif token.token_type == TOKEN_COMMENT:
|
elif token.token_type == TOKEN_COMMENT:
|
||||||
text.append('{# ')
|
text.append('{# ')
|
||||||
text.append(token.contents)
|
text.append(token.contents)
|
||||||
if token.token_type == TOKEN_VAR:
|
if token.token_type == TOKEN_VAR:
|
||||||
text.append('}}')
|
text.append(' }}')
|
||||||
elif token.token_type == TOKEN_BLOCK:
|
elif token.token_type == TOKEN_BLOCK:
|
||||||
text.append('%}')
|
text.append(' %}')
|
||||||
elif token.token_type == TOKEN_COMMENT:
|
elif token.token_type == TOKEN_COMMENT:
|
||||||
text.append(' #}')
|
text.append(' #}')
|
||||||
|
|
||||||
|
|
|
@ -256,7 +256,7 @@ def test_page_skeleton(app):
|
||||||
assert 'Foobar' in resp.text
|
assert 'Foobar' in resp.text
|
||||||
|
|
||||||
# check {% now %} inside a skeleton_extra_placeholder is not interpreted
|
# 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
|
assert '{# generation time #}' in resp.text
|
||||||
|
|
||||||
# check cells in footer are present even if there's no redirection page
|
# check cells in footer are present even if there's no redirection page
|
||||||
|
|
Loading…
Reference in New Issue