Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add whitespace control options: trim_blocks, lstrip_blocks #116

Merged
merged 1 commit into from
Sep 8, 2019

Conversation

jpcima
Copy link
Contributor

@jpcima jpcima commented Aug 25, 2019

I add these options from Jinjas2 API.

When enabled together, they can give a nicer output to conditional and loop blocks, by eliminating whitespace on lines where these blocks reside alone.
https://tedboy.github.io/jinja2/templ6.html

It's implemented on comments and statements.
Compared against Jinjas2, I obtained identical outputs.

@pantor pantor merged commit 66196fd into pantor:master Sep 8, 2019
@pantor
Copy link
Owner

pantor commented Sep 8, 2019

Great, thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants