Templater has some whitespace controls (second section of the linked post) you include in the template. You could try some of those.