Java Mailing List Archive

http://www.junlu.com/

Home » FreeMarker-user »

Re: [FreeMarker-user] Change the variable delimiter

Daniel Dekany

2011-11-04

Replies: Find Java Web Hosting

Author LoginPost Reply
Friday, November 4, 2011, 12:07:52 PM, Sandro Munda wrote:

> Hello,
>
> I would like to change the variable delimiter in FreeMarker. It's a
> big problem for my use case, because I need to process some Bash files
> using Freemarker.
> The <#noparse> </#noparse> is really ugly. I don't understand why I
> can't change the default variable delimiter easily.

Because unfortunately it's hard-wired into the parser... The best you
can do right now is writing a TemplateLoader that transforms the
templates, like, replacing "${"-s with "$<#-- -->{"-s and replacing
"#{"-s with "${"-s.

> Anybody can help me ?
> Thanks.
>
> Sandro Munda
> <munda.sandro@(protected)>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> FreeMarker-user mailing list
> FreeMarker-user@(protected)
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>

--
Best regards,
Daniel Dekany


------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
FreeMarker-user mailing list
FreeMarker-user@(protected)
https://lists.sourceforge.net/lists/listinfo/freemarker-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.