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.
The following twig line breaks a twig file {% set f = '..'|split('\\') %} The current workaround is to add a space and trim it: {% set f = '..'|split('\\ '|trim) %}
Hmm...seems to be a bug in JFlex, because string without a trailing quote is matched by a reg exp which requires ending quote :/ So the fix will not be as simple as it looks like, lexing of strings has to be rewritten somehow.
Fixed in web-main #1eb74ea9f88a
Sorry, I had to revert it because it broke up escaping inside strings (which is used much more, this case happens only when backslash is right before closing quote). Thats definitely bug in JFlex, simple common regexs for matching simple strings doesn't work at all (it fails in case when \ is before closing delimiter).
Integrated into 'main-silver', will be available in build *201401230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/1eb74ea9f88a User: Ondrej Brejla <obrejla@netbeans.org> Log: #240795 - Twig doesn't escape well the \
@Ondrej A new version of JFlex has been released 2 days ago!, maybe it gives a chance to fix this issue. Have you tried it ? If not, would you mind posting a bug in JFlex ? Indded, as for a previous bug (an external tool was involved), it has much efficienty if bug is reported by a netbeans developer I guess ;) Big thanks for your work btw, NB is so nice for php/symfony/twig dev!
Yes I tried that yesterday...still same problem. I'll have to prepare some simple sample which reproduces that issue. Thanks!
Updated metadata as this affects generic PHP, not just Twig.
AFAR, probably, this issue was fixed in the issue 248316. So please try to use a dev version[1]. [1] http://bits.netbeans.org/download/trunk/nightly/latest/ Thanks. *** This bug has been marked as a duplicate of bug 248316 ***
Created attachment 164395 [details] screenshot