mirror of https://github.com/zulip/zulip.git
template_parser: Add 'with' to Django/Jinja block elements.
Fixes #5863.
This commit is contained in:
parent
9782911aca
commit
7840ae0fe4
|
@ -289,6 +289,7 @@ def is_django_block_tag(tag):
|
||||||
'blocktrans',
|
'blocktrans',
|
||||||
'trans',
|
'trans',
|
||||||
'raw',
|
'raw',
|
||||||
|
'with',
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_handlebars_tag(text, i):
|
def get_handlebars_tag(text, i):
|
||||||
|
|
|
@ -77,6 +77,15 @@ class ParserTest(unittest.TestCase):
|
||||||
'''
|
'''
|
||||||
validate(text=my_html)
|
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):
|
def test_validate_no_start_tag(self):
|
||||||
# type: () -> None
|
# type: () -> None
|
||||||
my_html = '''
|
my_html = '''
|
||||||
|
|
Loading…
Reference in New Issue