Is there a Flask or Jinja2 configuration flag / extension to automatically minify the HTML output after rendering the template?
Use the decorator.
from htmlmin.decorator import htmlmin @htmlmin def home(): ...
Or you can just use:
re.sub(r'>\s+<', '><', ' ') # results ''