From c80a738c806697369d77b522b1f2524eec9e2c11 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Sun, 26 Jul 2020 19:11:44 -0300 Subject: Add the run-once target I need to look into async/await before trying to make a proper run target, but this should help until then. --- ganarchy/templating/environment.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ganarchy/templating') diff --git a/ganarchy/templating/environment.py b/ganarchy/templating/environment.py index a527053..0258f4d 100644 --- a/ganarchy/templating/environment.py +++ b/ganarchy/templating/environment.py @@ -22,7 +22,9 @@ import ganarchy.templating.toml def get_env(): env = jinja2.Environment( loader=ganarchy.templating.templates.get_template_loader(), - autoescape=False + autoescape=False, + # aka please_stop_mangling_my_templates=True + keep_trailing_newline=True ) env.filters['tomlescape'] = ganarchy.templating.toml.tomlescape env.filters['tomle'] = env.filters['tomlescape'] -- cgit 1.4.1