From 6c4f539463074bcb563675b6e4f19464339e5641 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 21 May 2020 11:55:14 -0700 Subject: less whitespace in jinja2 output --- fatcat_scholar/web.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fatcat_scholar') diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py index e1ef478..a148c8b 100644 --- a/fatcat_scholar/web.py +++ b/fatcat_scholar/web.py @@ -105,6 +105,10 @@ def load_i18n_templates(): locale_ngettext(translations), newstyle=True, ) + # remove a lot of whitespace in HTML output with these configs + templates.env.trim_blocks = True + templates.env.istrip_blocks = True + # pass-through application settings to be available in templates templates.env.globals['settings'] = settings d[lang_opt] = templates return d -- cgit v1.2.3