Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'{' came as a complete surprise to me

I want to use org.stringtemplate.v4.* as template engine for rendering html pages. However I cant find how to escape open brackets in my file. Templator thinks that it is some expression, while it is just javascript code.

I tried \{ but this not help - i stil got

504:15: invalid character '\'
504:16: '{' came as a complete surprise to me

How to escape this? Or what analogs of stringtemplate exist, that can correctly handle html page as input?

like image 317
msangel Avatar asked Jan 31 '26 22:01

msangel


1 Answers

When I got this error was because I forgot a end sign ($) for a attribute. It should be like this $attribute.name$

Reference: http://www.antlr.org/wiki/display/ST/Expressions#Expressions-AttributeReferences

like image 137
Peter Avatar answered Feb 03 '26 11:02

Peter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!