[stringtemplate-interest] Conflict with jQuery's $
Terence Parr
parrt at cs.usfca.edu
Wed Jun 18 07:43:19 PDT 2008
Howdy. I'm using ANTLR to parse the expressions and so it likes
fixed delimiters. sorry!
Ter
On Jun 18, 2008, at 4:31 AM, Bilal Bhatti wrote:
> Hi,
>
> I ran into the same issue. Escaping $ with \$ works but it is not
> an ideal solution. Also, using <..> is even worse, as if you are
> using jQuery you are probably in a webapp and then wouldn't that
> conflict with HTML tags?
>
> I think the way ST delimits an expression could be better. Velocity
> doesn't have any problem with expressions like these or using $ for
> jQuery. May be it ST could ignore a single $ and only attempt to
> evaluate an expression that has a closing $, like $.....$.
>
> Thanks.
>
> BTW: I really like ST :)
>
> On Mon, Jun 16, 2008 at 2:30 AM, Terence Parr <parrt at cs.usfca.edu>
> wrote:
> hi. try \$ and also can use <...> delimiters :)
> Ter
> On Jun 16, 2008, at 3:08 AM, Jeyaram Gurusamy wrote:
>
> > Dear All,
> >
> > I am just starting with StringTemplate. I am afraid that it could
> > have been answered already but I wasn't able to search the
> > newsgroup archives.
> >
> > ST seems to conflict with jQuery's $. The following code
> >
> > $("something").something
> >
> > throws this error
> >
> > action parse error in group mainGroup line 0; template context is
> > [context_name]
> > line 1:20: unexpected token: .
> > at org.antlr.stringtemplate.language.ActionParser.action
> > (ActionParser.java:143)
> > at org.antlr.stringtemplate.StringTemplate.parseAction
> > (StringTemplate.java:879)
> >
> > Is it a known problem? Is there a solution to it?
> >
> > I understand that we shall change jQuery's $ to something else as
> > it is just an alias to jQuery itself. But is there any other
> > solution without touching jQuery's $?
> >
> >
> > Thank you very much for your time.
> >
> > Regards
> > Jeyaram
> >
> >
> > _______________________________________________
> > stringtemplate-interest mailing list
> > stringtemplate-interest at antlr.org
> > http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list