-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Option to always chomp whitespace #499
Comments
I'm not super sure how to feel about this as it adds functionality that goes beyond the scope of what's also in Jinja2. That said, I'm not entirely opposed to it. |
right on. I'll take a look and see what I can figure out. My use case is that I'm making a website builder that's using minijinja. I'd like to make the output a little easier for new folks to look at. My idea is to collapse everything and then explicitly put in spaces/newlines. I'm not entirely sure it'll be any better, but I think it's worth a look. |
(I'm also looking for a rust pretty-print html option that might be another approach. I'm not having luck on that front yet. It feels like I have to be missing something, so I'm still digging into that too) |
I'm using
lstrip_blocks
andset_trim_blocks
to help with white space, but it's still bugs me and I end up with a lot of manual removal by adding-
I'd like to request a feature to treat every tag and expression as if it started and ended with
-
to remove the white space beside them. The idea is to then use something like{{ ' ' }}
explicitly when you need a space. The feature could be a function calledset_collapse_spaces
I'm happy to put in work to help make this happen if it's acceptable
The text was updated successfully, but these errors were encountered: