-
-
Notifications
You must be signed in to change notification settings - Fork 397
Closed
Labels
Description
Using Scriban v5.4.6
Template:
{{ "b" }}
Normal Text
{{ "indented text" }}Output:
b
Normal Text
indented text
Expected:
b
Normal Text
indented text
FWIW, I tried investigating it myself. {{ "b" }} causes the TemplateContext's _previousTextWasNewLine to be set to true. Then, Normal Text\n[THE 4 SPACES INCLUDED] is printed to the output(_previousTextWasNewLine is not set to false here). Finally, {{ "indented text" }} is printed to the output. Since _previousTextWasNewLine is true at the final step, the current indent is re-printed as if it were a new and blank line, causing the indent to duplicate