Details
Description
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.