Fix literal block multiline parsing

Fixes #8394
This commit is contained in:
James Cammarata 2014-08-04 09:31:30 -05:00
parent 07bb7e5a3b
commit af0d8cda7b
4 changed files with 102 additions and 46 deletions

View file

@ -705,8 +705,9 @@ class TestUtils(unittest.TestCase):
# jinja2 loop blocks with lots of complexity
_test_combo(
# in memory of neighbors cat
'a {% if x %} y {%else %} {{meow}} {% endif %} cookiechip\ndone',
['a', '{% if x %}', 'y', '{%else %}', '{{meow}}', '{% endif %}', 'cookiechip\ndone']
# we only preserve newlines inside of quotes
'a {% if x %} y {%else %} {{meow}} {% endif %} "cookie\nchip"\ndone',
['a', '{% if x %}', 'y', '{%else %}', '{{meow}}', '{% endif %}', '"cookie\nchip"', 'done']
)
# test space preservation within quotes