We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca6e899 commit 4ee48faCopy full SHA for 4ee48fa
scripts/jinja/jinja-tester.py
@@ -28,7 +28,8 @@ def format_template_content(template_content):
28
return template_content
29
30
env = ImmutableSandboxedEnvironment()
31
- tokens = list(env.lex(template_content))
+ tc_rstrip = template_content.rstrip()
32
+ tokens = list(env.lex(tc_rstrip))
33
result = ""
34
indent_level = 0
35
i = 0
@@ -146,7 +147,6 @@ def format_template_content(template_content):
146
147
result = result.rstrip()
148
149
# Copy the newline / space count from the original
- tc_rstrip = template_content.rstrip()
150
if (trailing_length := len(template_content) - len(tc_rstrip)):
151
result += template_content[-trailing_length:]
152
0 commit comments