highlight "this" in JavaScript

This commit is contained in:
Fabian Jakobs 2010-10-05 12:29:09 +02:00
commit 32a6a1794f
3 changed files with 7 additions and 1 deletions

View file

@ -78,6 +78,8 @@ JavaScriptHighlightRules = function() {
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
}, {
token : function(value) {
if (value == "this")
return "variable";
if (keywords[value]) {
return "keyword";
}

View file

@ -30,7 +30,7 @@
border-left: 1px solid black;
}
.ace-eclipse .ace_line .ace_keyword {
.ace-eclipse .ace_line .ace_keyword, .ace-eclipse .ace_line .ace_variable {
color: rgb(127, 0, 85);
}

View file

@ -79,6 +79,10 @@
color: rgb(0, 0, 205);
}
.ace-tm .ace_line .ace_variable {
color: rgb(49, 132, 149);
}
.ace-tm .ace_line .ace_xml_pe {
color: rgb(104, 104, 91);
}