You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Nathan Bubna (JIRA)" <de...@velocity.apache.org> on 2008/08/20 18:46:47 UTC

[jira] Resolved: (VELOCITY-552) Lost $ within literal blocks when not followed by alpha

     [ https://issues.apache.org/jira/browse/VELOCITY-552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna resolved VELOCITY-552.
-----------------------------------

    Resolution: Duplicate

This is indeed a duplicate of VELOCITY-355, as Dan suspected.  Fix to follow shortly...

> Lost $ within literal blocks when not followed by alpha
> -------------------------------------------------------
>
>                 Key: VELOCITY-552
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-552
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5
>         Environment: Windows XP or Solaris, JDK 1.4.2_10
>            Reporter: Dan Ertman
>             Fix For: 1.6
>
>         Attachments: Velocity552TestCase.java
>
>
> This is probably the same root cause as #355 (lost #s).
> I was happy to find the #literal() directive in the user guide, because I intend to output SH script from Velocity, which could otherwise get messy. Unfortunately, under certain circumstances, $s are being gobbled.
> Consider this VTL fragment:
> #literal()
> export $VAR=$(echo $testme)
> #end
> Run through evaluate, this spits out
> export $VAR=(echo $testme)
> which isn't very literal (and is a compilation fault in SH). Even more odd, 
> #literal()
> export $VAR=\$(echo $testme)
> #end
> outputs
> export $VAR=\(echo $testme)
> Did some further testing on it, and if the $ isn't followed by alpha, it gets gobbled, but only inside a literal block.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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