Help:Avoiding whitespace
From Linux Web Expert
Parser functions
Using parser functions for data declaration within the same page can cause whitespace to appear in the article. This can be avoided by wrapping the declaration into a div-element:
<div style="display:none;">{{#subobject: ...}} ... {{#set: ...}}</div>
See also: stripnewlines.