Highlight regular expressions
This commit is contained in:
parent
325d1e20c3
commit
05cd13b45e
7 changed files with 20 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ JavaScriptHighlightRules = function() {
|
|||
regex : "\\/\\*",
|
||||
next : "comment"
|
||||
}, {
|
||||
token : "regex",
|
||||
token : "string.regexp",
|
||||
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).;]|$)"
|
||||
}, {
|
||||
token : "string", // single line
|
||||
|
|
|
|||
|
|
@ -127,6 +127,10 @@ color:#B52A1D;\
|
|||
color:#0B6125;\
|
||||
}\
|
||||
\
|
||||
.ace-dawn .ace_string.ace_regexp {\
|
||||
color:#CF5628;\
|
||||
}\
|
||||
\
|
||||
.ace-dawn .ace_comment {\
|
||||
font-style:italic;\
|
||||
color:#5A525F;\
|
||||
|
|
|
|||
|
|
@ -123,6 +123,10 @@ background-color:#FF0000;\
|
|||
color:#A5C261;\
|
||||
}\
|
||||
\
|
||||
.ace-idle-fingers .ace_string.ace_regexp {\
|
||||
color:#CCCC33;\
|
||||
}\
|
||||
\
|
||||
.ace-idle-fingers .ace_comment {\
|
||||
font-style:italic;\
|
||||
color:#BC9458;\
|
||||
|
|
|
|||
|
|
@ -125,6 +125,10 @@ color:#D2A8A1;\
|
|||
color:#8F9D6A;\
|
||||
}\
|
||||
\
|
||||
.ace-twilight .ace_string.ace_regexp {\
|
||||
color:#E9C062;\
|
||||
}\
|
||||
\
|
||||
.ace-twilight .ace_comment {\
|
||||
font-style:italic;\
|
||||
color:#5F5A60;\
|
||||
|
|
|
|||
|
|
@ -114,6 +114,6 @@
|
|||
background: rgb(232, 242, 254);
|
||||
}
|
||||
|
||||
.ace-tm .ace_regex {
|
||||
.ace-tm .ace_string.ace_regex {
|
||||
color: rgb(255, 0, 0)
|
||||
}
|
||||
|
|
@ -119,6 +119,10 @@
|
|||
%string%
|
||||
}
|
||||
|
||||
.%cssClass% .ace_string.ace_regexp {
|
||||
%string.regexp%
|
||||
}
|
||||
|
||||
.%cssClass% .ace_comment {
|
||||
%comment%
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ var supportedScopes = {
|
|||
"invalid.deprecated": "invalid.deprecated",
|
||||
|
||||
"string": "string",
|
||||
"string.regexp": "string.regexp",
|
||||
|
||||
"comment": "comment",
|
||||
"comment.documentation": "comment.doc",
|
||||
"comment.documentation.tag": "comment.doc.tag",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue