This is actually common for almost all template languages, and reasoning comes directly from simplified processing. Consider the following example (this is actually the GSP used by Grails, but the idea is the same):
<g:each var="x" in="exes"> ${xy} </g:each>
The processing method is that the tag is first identified (or in the Velocity directive, directive). Since the tag / directive itself contains instructions for processing the body of the tag, the tag of the tag / directive is deleted, and all content immediately after the start tag and immediately before the end tag is used as the target for processing. This includes all the gaps, because cleaning up the output will be much more difficult.
This, of course, does not mean that you cannot do this, as Edd points out, or that this will be the most reasonable design choice in the first place, but sometimes doing something is simpler than creating beautiful layouts - After all, most, if not all markup processors don't care if you have <p>some\ncontent</p>
or <p>some\n\n\n\t\tcontent</p>
.
Esko
source share