fix(developer): do not treat backslash as a string escape in syntax highlighting

Adjust two incorrect rules that caused backslash to be treated as an
escape in strings in syntax highlighting in .kmn language.

Fixes: #14988
Test-bot: skip
Build-bot: skip
Cherry-pick-of: #15001
This commit is contained in:
Marc Durdin 2025-10-23 11:55:17 +02:00
parent 2db726aa3e
commit b9b97d293b

View file

@ -53,8 +53,8 @@ define("language.keyman", ["require", "exports"], function (require, exports) {
[/\[/, { token: 'tag', bracket: '@open', next: '@virtualKey' } ],
// strings
[/"([^"]|\\.)*$/, 'string.invalid' ], // non-teminated string
[/'([^']|\\.)*$/, 'string.invalid' ], // non-teminated string
[/"([^"])*$/, 'string.invalid' ], // non-teminated string
[/'([^'])*$/, 'string.invalid' ], // non-teminated string
[/"/, { token: 'string.quote', bracket: '@open', next: '@stringDouble' } ],
[/'/, { token: 'string.quote', bracket: '@open', next: '@stringSingle' } ],
],