velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apa...@recks.org
Subject Re: Whitespaces and velocity 2.0
Date Fri, 18 Feb 2011 10:36:39 GMT
Hi,

the whitespace issue has not been solved yet. Nathan kindly invited me to contribute, but
my workload has not let me do it.

The approach suggested by Byron Foster in the issue seems the right way to go:
"It seems straight forward to alter the parser so that no white space is consumed. Then, with
a property switch, the AST tree could be walked and altered so that white space is aggressively
removed post-parse according to the rules provided in the issue description."

Initially we would need the parser modification to leave whitespace untouched plus at least
one (default) post-processor to implement the backward-compatible current gobbling. Then it
would be easy to implement and contribute further gobblers.

Maybe someone listening wants to tackle this?

Kind regards,
Christoph

Ludwig Magnusson on 2011-02-18 10:50 wrote:
> Hello!
>
> I noticed the discussion about the whitespaces velocity generates, and I
> also noticed this issue due in version 2.0 of velocity:
>   <https://issues.apache.org/jira/browse/VELOCITY-253>
> https://issues.apache.org/jira/browse/VELOCITY-253
>
> Since I use velocity for html-generation the best case regarding whitespace
> for me would be to be able to keep my templates well-formatted and indented
> but to have all excessive whitespace omitted by the velocity engine. Is this
> something that is worked on/possible/wanted in the velocity community?
>
> /Ludwig
>
>

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


Mime
View raw message