mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Clean up how missing end tags are handled in template parsing.
The null token was an artificial placeholder that wasn't making clear what the problem was. Throwing an exception is bolder.
This commit is contained in:
@@ -211,16 +211,8 @@ def validate(fn=None, text=None, check_indent=True):
|
||||
elif kind == 'django_end':
|
||||
state.matcher(token)
|
||||
|
||||
null_token = Token(
|
||||
kind=None,
|
||||
s='(NO TAG)',
|
||||
tag='NO TAG',
|
||||
line=0,
|
||||
col=0,
|
||||
)
|
||||
|
||||
if state.depth != 0:
|
||||
state.matcher(null_token)
|
||||
raise TemplateParserException('Missing end tag')
|
||||
|
||||
def is_special_html_tag(s, tag):
|
||||
# type: (str, str) -> bool
|
||||
|
||||
Reference in New Issue
Block a user