When Building, Clean HTML

Would it be possible to implement a feature that clears all blank lines when building the site?

I know that Go 1.6 Template gave a solution to this, but it seems excessive for every single {{ }} to have a - attached to it when it could be part of the build process. If nothing else, something that just ignores all If, else, end and what not.