Ick.  I've no idea what's happening here.  Filing a bug report with a
test case would be appreciated.

In the meantime, the best i can do is point out that #*<whitespace>*#
is the more common technique for exercising complete whitespace
control.  There are fewer complications with multi-line comments than
single line ones.  Also, that technique allows people to indent the
source instead of squish it all to the left.  Might be better to stick
to the more used path.

On Thu, Aug 29, 2013 at 10:55 AM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> All,
>
> Velocity 1.7, Oracle JDK 1.7.0_25
>
> I found something odd recently and was able to reduce it to this simple
> test-case:
>
> $foo##
> $foo.bar##
> $foo.bar.baz##
>
> Expected output (with foo=null):
>
> $foo$foo.bar$foo.bar.baz
>
> Actual output:
> $foo$foo.bar##
> $foo.bar.baz##
>
> Using {..} around the references makes this example work the way I had
> expected. Also, adding spaced /before/ the ## at the end of the lines
> makes the output look as I had expected.
>
> Another data point:
>
> $foo${foo.bar}##
> $foo.bar.baz}##
>
> (Note trailing } after "baz").
>
> Yields:
>
> $foo${foo.bar}$foo.bar.baz}
>
> I've been using ## at the end of lines where I want to avoid a newline
> in the output for a while... I just noticed this case recently. Is this
> something that /should/ work the way I expect, or am I abusing Velocity
> in this way?
>
> Thanks,
> -chris
>

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

Reply via email to