diff options
| author | 2022-04-20 00:12:09 -0400 | |
|---|---|---|
| committer | 2022-04-20 00:12:09 -0400 | |
| commit | 942e313727d1ad886a1024c24fe4a9e8e2e0bb3e (patch) | |
| tree | 1c4d5d826655cdb812c88563a25410f8b54e41d2 /scripts | |
| parent | 8eeed31eb2f86ac982fa4b26f93b15828289c56d (diff) | |
New upstream version 8.2.0.upstream/8.2.0
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/jinjify.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/jinjify.py b/scripts/jinjify.py index 629ffb1..4043dda 100755 --- a/scripts/jinjify.py +++ b/scripts/jinjify.py @@ -27,6 +27,10 @@ dumb_replacements = [ ['loop.index', 'loop.index0'], ['is None', 'is none'], ['is not None', 'is not none'], + [ + "{% import 'comments_helper_{{ context['comment_system'] }}.tmpl' as comments_helper_impl with context %}", + "{% import 'comments_helper_%s.tmpl' % comment_system as comments_helper_impl with context %}" + ] ] dumber_replacements = [ @@ -64,7 +68,7 @@ def jinjify(in_theme, out_theme): for repl in dumber_replacements: data = data.replace(*repl) - with io.open(out_template, "w+", encoding="utf-8") as outf: + with io.open(out_template, "w+", encoding="utf-8", newline="\n") as outf: outf.write(data + '\n') # Syntax check output |
