You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using lstrip_blocks and set_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 called set_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:
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: