Thanks, Claude, That's probably what I'll end up doing. Either one time or possibly do it dynamically in a custom resource loader. (The problem is these files are all spread out in different accounts with different authors and versioning).
WILL On Wed, Jun 1, 2011 at 1:11 AM, Claude Brisson <cla...@renegat.net> wrote: > You can alter your templates to match the new syntax, something like: > > find . -name "*.vtl" | xargs sed -ri -e > "s/\\\$([a-z.\(\)]+)(\[[^\]+])/$\{\1\}\2/g" > > so that every reference which is followed by square brackets will be > enclosed in curly brackets. > > > Claude > > > On 2011-06-01 09:44, Sergey Maslov wrote: > >> No ideas... >> >> On Wed, Jun 1, 2011 at 9:26 AM, Will Glass-Husain >> <wglasshus...@gmail.com> wrote: >> >>> Hi, >>> >>> I just did a test upgrade of a site from Velocity 1.6.2 to Velocity 1.7. >>> A >>> number of my templates started to fail because they included square >>> brackets. (Ironically, we discovered this soon after I finished >>> describing >>> to my coworkers the project's obsessive stance on backwards >>> compatibility). >>> My pages often reference mathematical values, and the bracket is a common >>> part of the text. >>> >>> This used to work >>> >>> #for($var in $varList) >>> $abc[sub1] >>> #end >>> >>> which would print something like >>> Sales[sub1] >>> Revenue[sub1] >>> Cost[sub1] >>> etc >>> >>> Now it gives a parse error. >>> >>> I see that ${abc}[sub1] keeps the old behavior. However, searching our >>> site >>> there have 40+ pages with many of these now illegal references. (Many by >>> other authors). >>> >>> Any suggestions as to how I can keep the backwards compatible parsing >>> behavior? >>> >>> I'll dig into the Velocity code, see if I can think of anything helpful. >>> But just wanted to check if others had ideas. >>> >>> WILL >>> >>> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org >> For additional commands, e-mail: user-h...@velocity.apache.org >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org > For additional commands, e-mail: user-h...@velocity.apache.org > >