jinja2-htmlcompress
jinja2-htmlcompress copied to clipboard
Does not work correctly for macros.
{% macro render_menu(model, style='b-menu_type_header') %}
<ul class="b-menu {{ style }}">
Got next html:
<ul class="b-menub-menu_type_header">
It is also does not work if I put the variable into class
tag.
A workaround: -- prepend {{ style }} with {{ " " }}.
This is not correct.
I think this is similar to issue 8 -- I've got a fork of this module over in https://github.com/eli-collins/jinja2-htmlcompress with a rewritten parser that should take care of this issue - it's a little less agressive / smarter about when it completely removes spaces.