Don't require link tags to close when checking templates.

This commit is contained in:
Josh Mandel 2015-11-22 09:08:48 +01:00 committed by Tim Abbott
parent 7ad7e7a082
commit bdb9535251
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,9 @@ def validate(fn, check_indent=True):
if looking_at("<") and not looking_at("</"): if looking_at("<") and not looking_at("</"):
s = get_html_tag(text, state.i) s = get_html_tag(text, state.i)
tag = s[1:-1].split()[0] tag = s[1:-1].split()[0]
ignore = s.startswith('<!--') or s.endswith('/>') or tag in ['meta', '!DOCTYPE'] ignore = (s.startswith('<!--') or
s.endswith('/>') or
tag in ['link', 'meta', '!DOCTYPE'])
if not ignore: if not ignore:
start_tag_matcher(s, tag) start_tag_matcher(s, tag)
advance(len(s)) advance(len(s))