From 97f28f3792c35064856e4b0cc8649a8f62ff04e1 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 12 Jul 2016 12:28:08 -0700 Subject: [PATCH] Revert "Close HTML singleton tags in Casper files." This reverts commit 520b255d95542c1b5794683a4a43d424a5c9d590, and also blacklists Casper files from our linter. --- .../casperjs/tests/site/field-array.html | 6 +++--- frontend_tests/casperjs/tests/site/form.html | 20 +++++++++---------- .../casperjs/tests/site/frames.html | 4 ++-- .../casperjs/tests/site/multiple-forms.html | 8 ++++---- .../casperjs/tests/site/visible.html | 8 ++++---- tools/check-templates | 11 ++++++++-- 6 files changed, 32 insertions(+), 25 deletions(-) diff --git a/frontend_tests/casperjs/tests/site/field-array.html b/frontend_tests/casperjs/tests/site/field-array.html index e70dad3f23..0d64d96186 100644 --- a/frontend_tests/casperjs/tests/site/field-array.html +++ b/frontend_tests/casperjs/tests/site/field-array.html @@ -6,9 +6,9 @@
- - - + + +
diff --git a/frontend_tests/casperjs/tests/site/form.html b/frontend_tests/casperjs/tests/site/form.html index b86357b8af..e51ffa32d4 100644 --- a/frontend_tests/casperjs/tests/site/form.html +++ b/frontend_tests/casperjs/tests/site/form.html @@ -6,21 +6,21 @@
- - + + - - - - - - - - + + + + + + + +
diff --git a/frontend_tests/casperjs/tests/site/frames.html b/frontend_tests/casperjs/tests/site/frames.html index 05c3ca41ff..3c75ec33d9 100644 --- a/frontend_tests/casperjs/tests/site/frames.html +++ b/frontend_tests/casperjs/tests/site/frames.html @@ -5,8 +5,8 @@ CasperJS test frames - - + + diff --git a/frontend_tests/casperjs/tests/site/multiple-forms.html b/frontend_tests/casperjs/tests/site/multiple-forms.html index dd075c213d..3e9db353ca 100644 --- a/frontend_tests/casperjs/tests/site/multiple-forms.html +++ b/frontend_tests/casperjs/tests/site/multiple-forms.html @@ -5,12 +5,12 @@
- - + +
- - + +
diff --git a/frontend_tests/casperjs/tests/site/visible.html b/frontend_tests/casperjs/tests/site/visible.html index 1649524bbc..c638138f05 100644 --- a/frontend_tests/casperjs/tests/site/visible.html +++ b/frontend_tests/casperjs/tests/site/visible.html @@ -10,8 +10,8 @@ - - - + + + - + \ No newline at end of file diff --git a/tools/check-templates b/tools/check-templates index 7c0956163a..b11942f9be 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -204,9 +204,16 @@ def check_handlebar_templates(templates, modified_only): def check_html_templates(templates, modified_only): # Our files with .html extensions are usually for Django, but we also - # have some for Casper tests and a few static ones. + # have a few static .html files. # The file base.html has a bit of funny HTML that we can't parse here yet. - templates = filter(lambda fn: 'base.html' not in fn, templates) + # + # We also have .html files that we vendored from Casper. + # The casperjs files use HTML5 (whereas Zulip prefers XHTML), and + # there are also cases where Casper deliberately uses invalid HTML, + # so we exclude them from our linter. + templates = filter( + lambda fn: ('base.html' not in fn) and ('casperjs' not in fn), + templates) templates = sorted(list(templates)) if not modified_only: