From 5007e02502645c5bfd10b438c4bbcf1f3c96353e Mon Sep 17 00:00:00 2001 From: Garen Torikian Date: Sun, 3 Jun 2012 13:51:46 -0700 Subject: [PATCH] Fix js highlighting rules --- lib/ace/mode/javascript_highlight_rules.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/ace/mode/javascript_highlight_rules.js b/lib/ace/mode/javascript_highlight_rules.js index 18100423..63348303 100644 --- a/lib/ace/mode/javascript_highlight_rules.js +++ b/lib/ace/mode/javascript_highlight_rules.js @@ -191,6 +191,22 @@ var JavaScriptHighlightRules = function() { ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" + }, { // match stuff like: Sound.play = function play() { } + token : [ + "storage.type", + "punctuation.operator", + "entity.name.function", + "text", + "keyword.operator", + "text", + "storage.type", + "text", + "entity.name.function", + "text", + "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" }, { // match regular function like: function myFunc(arg) { } token : [ "storage.type",