Hacker News new | ask | show | jobs
by irahul 5167 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)

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

1 comments

Nice! Going to integrate this into my blogofile setup so that I can output nicer HTML!