[javascript mode] Fix recognition of class property keywords before private names

Closes https://github.com/codemirror/codemirror5/issues/6996
This commit is contained in:
Marijn Haverbeke 2022-10-26 14:23:29 +02:00
parent e1fe2100d0
commit 9296326b0a
1 changed files with 1 additions and 1 deletions

View File

@ -779,7 +779,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
if (type == "async" ||
(type == "variable" &&
(value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
cx.stream.match(/^\s+#?[\w$\xa1-\uffff]/, false))) {
cx.marked = "keyword";
return cont(classBody);
}