[ https://issues.apache.org/jira/browse/VELOCITY-552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Bubna updated VELOCITY-552: ---------------------------------- Attachment: Velocity552TestCase.java Here's a simple test case for the issue. > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]