Sublime Forum

Sublime marking error when there is none

#1

Sublime is marking the last curly bracket in the expression below as erroneous. Not sure why. (If it matters, this is in a .blade.php file using Laravel).

<a onclick="f({{ $my->data }})">

Is this a bug or should I adjust some setting?

0 Likes

#2

The f(...) is intended to be pure JavaScript which doesn’t support curly braces within function arguments this way (if I recall correct). The default HTML/PHP or JavaScript syntax doesn’t know about 3rd party tags such as {{ blabla }}.

You’ll need a dedicated syntax supporting your Laravel tags.

Maybe: https://packagecontrol.io/packages/Laravel%20Blade%20Highlighter

0 Likes