|
|
|
|
|
by calloc
5166 days ago
|
|
Not sure if this is the case or not, but certain templating systems make it really hard to remove extra whitespace/lines (I'm looking at you Jinja2) and they get added when you use standard templating stuff like "if/then" statements. Removing them after the fact with a HTML tidier would work, or you could just not care and let gzip handle the compression. |
|
Jinja2 is a generic templating engine, and as such can't make assumptions about relevance of whitespace.
However, writing an extension on top of it isn't hard, and mitsuhiko has written an extension to do that.
https://github.com/mitsuhiko/jinja2-htmlcompress