Skip to content
Snippets Groups Projects
Commit cbaf9b9f authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[javascript mode] Properly handle keywords as class method names

Closes #4941
parent 06ed8a17
No related branches found
No related tags found
No related merge requests found
......@@ -674,7 +674,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
cx.marked = "keyword";
return cont(classBody);
}
if (type == "variable") {
if (type == "variable" || cx.style == "keyword") {
cx.marked = "property";
return cont(isTS ? classfield : functiondef, classBody);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment