Don't treat self-closing tags as context starters

This commit is contained in:
Calen Pennington
2018-06-12 22:36:12 -04:00
parent b735a127b9
commit 1491491d21

View File

@@ -1366,15 +1366,15 @@ class MakoTemplateLinter(BaseLinter):
"""
contexts_re = re.compile(
r"""
<script.*?> | # script tag start
<script.*?(?<!/)> | # script tag start
</script> | # script tag end
<%static:require_module(_async)?.*?> | # require js script tag start (optionally the _async version)
<%static:require_module(_async)?.*?(?<!/)> | # require js script tag start (optionally the _async version)
</%static:require_module(_async)?> | # require js script tag end (optionally the _async version)
<%static:webpack.*?> | # webpack script tag start
<%static:webpack.*(?<!/)> | # webpack script tag start
</%static:webpack> | # webpack script tag end
<%static:studiofrontend.*?> | # studiofrontend script tag start
<%static:studiofrontend.*?(?<!/)> | # studiofrontend script tag start
</%static:studiofrontend> | # studiofrontend script tag end
<%block[ ]*name=['"]requirejs['"]\w*> | # require js tag start
<%block[ ]*name=['"]requirejs['"]\w*(?<!/)> | # require js tag start
</%block> # require js tag end
""",
re.VERBOSE | re.IGNORECASE