highlight "this" in JavaScript
This commit is contained in:
parent
602af86e94
commit
32a6a1794f
3 changed files with 7 additions and 1 deletions
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue