diff options
| author | 2022-04-20 00:13:08 -0400 | |
|---|---|---|
| committer | 2022-04-20 00:13:08 -0400 | |
| commit | aca2787b50094a4ab1f17162aa92c5263858743e (patch) | |
| tree | c227d3a22fe454f92162d8d91ecb81f3141ace94 /scripts/jinjify.py | |
| parent | 78e717290e125cab92aef712f12ae63fedb4070f (diff) | |
| parent | 942e313727d1ad886a1024c24fe4a9e8e2e0bb3e (diff) | |
Update upstream source from tag 'upstream/8.2.0'
Update to upstream version '8.2.0'
with Debian dir 65d01d7d78d6b41c0be6eb196ed84354526f9384
Diffstat (limited to 'scripts/jinjify.py')
| -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 |
