You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Gehlhaar, Dan" <da...@pfizer.com> on 2008/03/04 00:02:41 UTC

Possible bug in #literal() processing

Greetings, Velocity developers.  I am encountering a problem related to
the #literal() directive, in versions 1.4 and 1.5.  In #literal()
blocks, leading hash marks get stripped from lines if there is a space
after the hash mark.  When the bulk of what's in the #literal() section
is Perl code with lots of comments, this is a problem!

 

Any help would be greatly appreciated.

 

Thanks,

Dan Gehlhaar

 

Input:

-----------------------

#literal()

#No space after hash

# One space after hash

#end

-----------------------

 

Output:

-----------------------

#No space after hash

 One space after hash

-----------------------

 

 


Re: Possible bug in #literal() processing

Posted by Nathan Bubna <nb...@gmail.com>.
Weird.  Would you open up a JIRA issue on this?

http://issues.apache.org/jira/browse/VELOCITY

And if you wanted to go the extra mile, a test case patch would be awesome!  ;)

On Mon, Mar 3, 2008 at 3:02 PM, Gehlhaar, Dan <da...@pfizer.com> wrote:
> Greetings, Velocity developers.  I am encountering a problem related to
>  the #literal() directive, in versions 1.4 and 1.5.  In #literal()
>  blocks, leading hash marks get stripped from lines if there is a space
>  after the hash mark.  When the bulk of what's in the #literal() section
>  is Perl code with lots of comments, this is a problem!
>
>
>
>  Any help would be greatly appreciated.
>
>
>
>  Thanks,
>
>  Dan Gehlhaar
>
>
>
>  Input:
>
>  -----------------------
>
>  #literal()
>
>  #No space after hash
>
>  # One space after hash
>
>  #end
>
>  -----------------------
>
>
>
>  Output:
>
>  -----------------------
>
>  #No space after hash
>
>   One space after hash
>
>  -----------------------
>
>
>
>
>
>

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