From b49448de7dce6a44e2dde454358f3f19bd329488 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 27 Aug 2017 22:01:00 -0700 Subject: [PATCH] message_edit: Eliminat whitespace in recipient row controls. This is hacky, but I can't figure out another way to do it that doesn't cause other problems. Ideally, we'd add some sort of exclude rule to our HTML template linter so we can check the rest of the file. --- static/templates/recipient_row.handlebars | 5 ++--- tools/check-templates | 10 ++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/static/templates/recipient_row.handlebars b/static/templates/recipient_row.handlebars index 6e388bfab3..3302f0553b 100644 --- a/static/templates/recipient_row.handlebars +++ b/static/templates/recipient_row.handlebars @@ -29,9 +29,8 @@ {{subject}} {{/if}} - - - + + {{! edit subject pencil icon }} {{#if always_visible_topic_edit}} diff --git a/tools/check-templates b/tools/check-templates index c2a11d71ce..f1dfcd1878 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -147,10 +147,20 @@ def check_handlebar_templates(templates): # type: (Iterable[str]) -> None # Check all our handlebars templates. templates = [fn for fn in templates if fn.endswith('.handlebars')] + + IGNORE_FILES = [ + # TODO: Add some exclude mechanism for the line-wrapping issue here. + 'static/templates/recipient_row.handlebars', + ] + for fn in templates: + if fn in IGNORE_FILES: + continue validate(fn=fn, check_indent=True) for fn in templates: + if fn in IGNORE_FILES: + continue if not validate_indent_html(fn): sys.exit(1)