Matching all strings that start with
"< is doable, but current work on the PR would need to be improved to match incomplete xml strings gracefully, which I believe is possible though not trivial.
An easier approach is a more pragmatic solution that matches specific cases like
Similarly, it would be fairly easy to match strings preceded by a specific haxe metadata as mentioned in the PR like:
That would still be valid haxe syntax and allow to opt-in for xml syntax highlighting on a per-string basis.
None of these options is perfect and they all have pros and cons.
Imo, best option would be the one mentioned by @back2dos : match every string that starts with
"<, but with the addition that we update the tmLanguage syntax file so that invalid xml doesn’t break the whole file syntax highlighting (doable but not trivial).
I will be happy to resume my work on this if we come up with a practical solution that people could agree on though.