Is there a way to clean up the html that jinja2 produces? Add '-' to the tags: {%- if 'this'=='this' -%} {{ blah }} {%- endif -%}