aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar
diff options
context:
space:
mode:
Diffstat (limited to 'fatcat_scholar')
-rw-r--r--fatcat_scholar/web.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py
index 133ddce..010ad0d 100644
--- a/fatcat_scholar/web.py
+++ b/fatcat_scholar/web.py
@@ -158,6 +158,8 @@ def load_i18n_templates() -> Any:
# remove a lot of whitespace in HTML output with these configs
templates.env.trim_blocks = True
templates.env.lstrip_blocks = True
+ # have {% trans %} blocks trim whitespace by default
+ templates.env.policies['ext.i18n.trimmed'] = True
# pass-through application settings to be available in templates
templates.env.globals["settings"] = settings
d[lang_opt] = templates