Extension:WhiteSpace

The WhiteSpace extension provides two tags to control whitespace in templates: discards itself and all whitespace (including newlines) after the tag,  replaces itself with a newline.

Rationale
In wikitext spaces and newlines do matter. Leading space causes a paragraph to be verbatim, newline terminates a list item, etc. This means that template code cannot be formatted freely. For example, two subsequent template calls:

being reformatted as:

may produce different result (e. g. two list items instead of one). This is not a big deal for a simple template, but it quickly become a real issue for complicated templates. Let us consider a real example, a small part of Template:Extension:

HTML comments allows splitting template code to lines but it pollutes template code so the overall result is not so good. Using  the code can be reformatted as:

Of course, it is just another style of formatting, but  allows using this style regularly and uniformly.