Skip to content

Commit 9296326

Browse files
committed
[javascript mode] Fix recognition of class property keywords before private names
Closes #6996
1 parent e1fe210 commit 9296326

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/javascript/javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
779779
if (type == "async" ||
780780
(type == "variable" &&
781781
(value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
782-
cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
782+
cx.stream.match(/^\s+#?[\w$\xa1-\uffff]/, false))) {
783783
cx.marked = "keyword";
784784
return cont(classBody);
785785
}

0 commit comments

Comments
 (0)