template_parser: Add 'with' to Django/Jinja block elements.

Fixes #5863.
This commit is contained in:
Aditya Bansal 2017-07-20 00:34:34 +05:30 committed by showell
parent 9782911aca
commit 7840ae0fe4
2 changed files with 10 additions and 0 deletions

View File

@ -289,6 +289,7 @@ def is_django_block_tag(tag):
'blocktrans',
'trans',
'raw',
'with',
]
def get_handlebars_tag(text, i):

View File

@ -77,6 +77,15 @@ class ParserTest(unittest.TestCase):
'''
validate(text=my_html)
my_html = '''
{% block "content" %}
{% with className="class" %}
{% include 'foobar' %}
{% endwith %}
{% endblock %}
'''
validate(text=my_html)
def test_validate_no_start_tag(self):
# type: () -> None
my_html = '''