Fix comments

This commit is contained in:
Garen Torikian 2012-04-01 01:42:38 -07:00
commit 332d3d8857

View file

@ -151,10 +151,10 @@ var JavaScriptHighlightRules = function() {
}, { // match regular function like: function myFunc(arg) { }
token : ["storage.type", "text", "entity.name.function", "text", "paren.lparen", "variable.parameter", "paren.rparen"],
regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()(.*?)(\\))"
}, { // match stuff like: foobar: function() { }
}, { // match stuff like: foobar: function() { }
token : ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen", "variable.parameter", "paren.rparen"],
regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)?(\\s*)(\\()(.*?)(\\))"
}, { // Attempt to match : function() { } (this is for issues with 'foo': function() { }
}, { // Attempt to match : function() { } (this is for issues with 'foo': function() { })
token : ["text", "text", "storage.type", "text", "paren.lparen", "variable.parameter", "paren.rparen"],
regex : "(:)(\\s*)(function)?(\\s*)(\\()([^)]*)(\\))"
}, {