You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Espen Klem <Es...@fast.no> on 2005/06/14 15:57:02 UTC

Unwanted Whitespace and linefeed in .vm-files: Different approach...

Aren't the varying automatic approaches a bit to strict or drastic?
Ref: http://wiki.apache.org/jakarta-velocity/VelocityWhitespaceGobbling

What about the way Freemarker solves this problem? The possibility to,
for the end user, both take away unwanted indents and linefeeds seems
very good. I've used this before on Freemarker templates producing html,
and I was very happy with the soultion.
Ref: http://freemarker.org/docs/dgui_misc_whitespace.html#autoid_24

Best regards,
Espen Klem

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Unwanted Whitespace and linefeed in .vm-files: Different approach...

Posted by Nathan Bubna <nb...@gmail.com>.
The varying automatic approaches described on that velocity wiki page
are proposed *defaults*.  Having a default is unavoidable, and to
answer your rhetorical questions: no, i don't think those "varying
automatic approaches" are strict or drastic; they're the most common
sense (with the exception of "As Usual") options for default behavior
of a templating system.

Adding special directives for whitespace stripping (e.g. freemarker's
#compress) would fall under the "Secondary Issues" listed on that
page.  i think we'd be happy to take suggestions and contributions for
secondary whitespace control options, but let's not confuse that
tactic with the necessity of having a default behavior.

On 6/14/05, Espen Klem <Es...@fast.no> wrote:
> Aren't the varying automatic approaches a bit to strict or drastic?
> Ref: http://wiki.apache.org/jakarta-velocity/VelocityWhitespaceGobbling
> 
> What about the way Freemarker solves this problem? The possibility to,
> for the end user, both take away unwanted indents and linefeeds seems
> very good. I've used this before on Freemarker templates producing html,
> and I was very happy with the soultion.
> Ref: http://freemarker.org/docs/dgui_misc_whitespace.html#autoid_24
> 
> Best regards,
> Espen Klem
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org