[sublime-syntax] No regex syntax highlighting in double-quoted strings
AmjadHD opened this issue · comments
This is a conscious choice, because double-quoted strings inside YAML require an escape of the backslash character, which is heavily used in regular expressions, leading to the string becoming almost unreadable if defined correctly. This is also why your double-quoted example is not equal to the single-quoted one, as all backslashes would require another backslash to escape them.
Because such expressions would be a nightmare to read (JSON says hello), YAML has single-quoted strings that do not suffer from this problem, since their only escape sequence is a doubled single quote (''
), and it would require basically a rewrite of the regular expression syntax definition that matches \\<any>
sequences instead of \<any>
, this is not feasible to support in my eyes. The current lack of highlighting should indicated that double-quoted strings are sub-optimal.