Sublime Forum

Syntax for own escaped syntax

#1

I have some code that has c style \ escaped strings containing code of the same syntax.
At the moment they are just highlighted as normal strings.
Is it possible to change the sublime-syntax to apply the same syntax to triple quoted strings, accounting for the \ characters?

Example apply scopes to the string:

string codeInString = """
string normalString = \"value\";
""";

To look like:

string normalString = "value";

It would be nicer not to have to duplicate the sublime-syntax to do it.

0 Likes

#2

It would be nicer not to have to duplicate the sublime-syntax to do it.

I’d suggest duplicating the syntax instead of overriding a built-in syntax, as updates will override any changes you’ve made.

0 Likes