lahodaj opened a new pull request, #6745:
URL: https://github.com/apache/netbeans/pull/6745
When String Templates (a Java preview feature) are used in the VS Code, the
content may look very weird, like:
- before semantic highlighting is applied:

- after semantic highlighting is applied:

Note that e.g. the nested String is not highlighted as a String. The "in
String" and "outside of String" is inverted for the nested expression, as the
grammar does not understand that the content of `\{...}` is not a String, but
an expression.
This patch attempts to resolve that, by nesting `#code` inside `\{...}`.
But, the inside of `\{...}` should not have `string.quoted.double.java` scope,
so the scope is removed from the pattern that matches the string, and is moved
to all the components, except the one of the inside of `\{...}`.
With this patch, the highlighting (with semantic highlighting) looks like
this:

Which seems satisfactory to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists