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.
Removing them after the fact with a HTML tidier would work, or you could just not care and let gzip handle the compression.