velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nbu...@gmail.com>
Subject Re: Whitespaces and velocity 2.0
Date Fri, 18 Feb 2011 15:52:37 GMT
On Fri, Feb 18, 2011 at 2:36 AM,  <apache@recks.org> wrote:
...
> "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."

Agreed.  I was thinking (could be wrong) that this would mean having
the parser create ASTWhitespace nodes, right?  (i keep hoping to have
some time to start on Byron's approach too.  Almost had time in
January, but other things came up.)

> 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.

Actually, since this is 2.0, backwards compatible output is not a high
priority.  It would be very valuable, but anyone tackling this should
be free to consider other options first.

> Then it would be easy to implement and
> contribute further gobblers.
>
> Maybe someone listening wants to tackle this?

yes, please.

> 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
>
>

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


Mime
View raw message