You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning Schmiedehausen (JIRA)" <ji...@apache.org> on 2006/11/05 13:37:17 UTC
[jira] Updated: (VELOCITY-355) lost '#'s inside #literal()/#end
[ http://issues.apache.org/jira/browse/VELOCITY-355?page=all ]
Henning Schmiedehausen updated VELOCITY-355:
--------------------------------------------
Bugzilla Id: (was: 33590)
Component/s: Engine
(was: Source)
Fix Version/s: 2.0
(was: 1.6)
This is one of the quirks in the current parser. Yes, it sucks. However, I'm not sure that we can amend that behaviour short of a complete parser rewrite. For that I postpone it to 2.0.
> lost '#'s inside #literal()/#end
> --------------------------------
>
> Key: VELOCITY-355
> URL: http://issues.apache.org/jira/browse/VELOCITY-355
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.4
> Environment: Operating System: All
> Platform: All
> Reporter: Geoffrey Lowney
> Fix For: 2.0
>
>
> I am using VTL (with VPP) to customize a portion of a Perl script. Since Perl
> code has a lot of dollar signs, I am using #literal()/#end to prevent Velocity
> from processing most of the file. What I find is that single '#' characters
> that are not followed by alpha text are removed (inside #literal()/#end).
> For example:
> #literal()
> #!/usr/bin/perl
> #end
> becomes:
> !/usr/bin/perl
> I've tried things like escaping the '#' ('\#') but that leaves the backslash
> ('\#!/usr/bin/perl' becomes '\!/usr/bin/perl'). Nothing seems to work.
> I can use a #set to define a variable with the value '#!/usr/bin/perl', but I
> was hoping I would not have to. It also doesn't help with other single #'s in
> the file (like Perl comments). For those I have had to double up the hashes.
> I'd be happy to try patching the Velocity source, but I had trouble making heads
> or tails of the parser engine?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org