diff --git a/src/ace/mode/JavaScriptHighlightRules.js b/src/ace/mode/JavaScriptHighlightRules.js index 3df16162..06a5a025 100644 --- a/src/ace/mode/JavaScriptHighlightRules.js +++ b/src/ace/mode/JavaScriptHighlightRules.js @@ -46,7 +46,7 @@ JavaScriptHighlightRules = function() { regex : "\\/\\*", next : "comment" }, { - token : "regex", + token : "string.regexp", regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).;]|$)" }, { token : "string", // single line diff --git a/src/ace/theme/Dawn.js b/src/ace/theme/Dawn.js index 7d4daf9d..621709ab 100644 --- a/src/ace/theme/Dawn.js +++ b/src/ace/theme/Dawn.js @@ -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;\ diff --git a/src/ace/theme/IdleFingers.js b/src/ace/theme/IdleFingers.js index d52bc240..5d2254f0 100644 --- a/src/ace/theme/IdleFingers.js +++ b/src/ace/theme/IdleFingers.js @@ -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;\ diff --git a/src/ace/theme/Twilight.js b/src/ace/theme/Twilight.js index e228f62a..58d97192 100644 --- a/src/ace/theme/Twilight.js +++ b/src/ace/theme/Twilight.js @@ -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;\ diff --git a/src/ace/theme/tm.css b/src/ace/theme/tm.css index acc3d982..67224c07 100644 --- a/src/ace/theme/tm.css +++ b/src/ace/theme/tm.css @@ -114,6 +114,6 @@ background: rgb(232, 242, 254); } -.ace-tm .ace_regex { +.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0) } \ No newline at end of file diff --git a/tool/Theme.tmpl.css b/tool/Theme.tmpl.css index 3ce12e1d..5d658f8a 100644 --- a/tool/Theme.tmpl.css +++ b/tool/Theme.tmpl.css @@ -119,6 +119,10 @@ %string% } +.%cssClass% .ace_string.ace_regexp { + %string.regexp% +} + .%cssClass% .ace_comment { %comment% } diff --git a/tool/tmtheme.js b/tool/tmtheme.js index bce7a1d7..fda80c9b 100644 --- a/tool/tmtheme.js +++ b/tool/tmtheme.js @@ -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",