This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 227752 - 'Unexpected token LBRACE found' error with class="{{...}}" in .twig file
Summary: 'Unexpected token LBRACE found' error with class="{{...}}" in .twig file
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-21 05:37 UTC by nairraf
Modified: 2013-07-01 13:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nairraf 2013-03-21 05:37:13 UTC
Easy to recreate:

* create a new blank .twig file somewhere with the following contents:
<tr class="{{cycle(['even', 'odd'], 4)}}"></tr>

you should see: "Unexpected token LBRACE found" in the action items window.

if you add any character before or after the double curly braces, the error goes away:
<tr class="a{{ }}"></tr>
<tr class="{{ }}b"></tr>

both the above are OK (no error), but in between the braces - and you have the error again:

shows error:
<tr class="{{a}}"></tr>

so I guess that the parser is looking for some alpha character between the class="" quotes, and not recognizing any twig functions between double braces, and throwing the LBRACE error.
Comment 1 Ondrej Brejla 2013-03-21 06:19:36 UTC
Imho html (css parser) issue? Marku, please, can you evaluate? Thanks a lot.
Comment 2 Marek Fukala 2013-07-01 13:36:15 UTC
looks like fixed by the fix of the issue 228054 (web-main#fe9ffb1fbf2a)