From b28cf374bef12d429bf83a658153e90d566808f5 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 1 Oct 2012 17:51:45 +0400 Subject: [PATCH] fix underescaped reexps --- lib/ace/mode/coldfusion_highlight_rules.js | 4 ++-- lib/ace/mode/html_highlight_rules.js | 4 ++-- lib/ace/mode/ruby_highlight_rules.js | 6 +++--- lib/ace/mode/tcl_highlight_rules.js | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/ace/mode/coldfusion_highlight_rules.js b/lib/ace/mode/coldfusion_highlight_rules.js index 3108081f..7f4a1e3f 100644 --- a/lib/ace/mode/coldfusion_highlight_rules.js +++ b/lib/ace/mode/coldfusion_highlight_rules.js @@ -58,11 +58,11 @@ var ColdfusionHighlightRules = function() { next : "comment" }, { token : "meta.tag", - regex : "<(?=\s*script)", + regex : "<(?=script)", next : "script" }, { token : "meta.tag", - regex : "<(?=\s*style)", + regex : "<(?=style)", next : "style" }, { token : "meta.tag", // opening tag diff --git a/lib/ace/mode/html_highlight_rules.js b/lib/ace/mode/html_highlight_rules.js index cf80bdd7..d6f42f63 100644 --- a/lib/ace/mode/html_highlight_rules.js +++ b/lib/ace/mode/html_highlight_rules.js @@ -80,11 +80,11 @@ var HtmlHighlightRules = function() { regex : "<\\!.*?>" }, { token : "meta.tag", - regex : "<(?=\s*script\\b)", + regex : "<(?=script\\b)", next : "script" }, { token : "meta.tag", - regex : "<(?=\s*style\\b)", + regex : "<(?=style\\b)", next : "style" }, { token : "meta.tag", // opening tag diff --git a/lib/ace/mode/ruby_highlight_rules.js b/lib/ace/mode/ruby_highlight_rules.js index 168657ac..d7a531f8 100644 --- a/lib/ace/mode/ruby_highlight_rules.js +++ b/lib/ace/mode/ruby_highlight_rules.js @@ -122,11 +122,11 @@ var RubyHighlightRules = function() { token : "text", // namespaces aren't symbols regex : "::" }, { - token : "variable.instancce", // instance variable - regex : "@{1,2}(?:[a-zA-Z_]|\d)+" + token : "variable.instance", // instance variable + regex : "@{1,2}[a-zA-Z_\\d]+" }, { token : "variable.class", // class name - regex : "[A-Z](?:[a-zA-Z_]|\d)+" + regex : "[A-Z][a-zA-Z_\\d]+" }, { token : "string", // symbol regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" diff --git a/lib/ace/mode/tcl_highlight_rules.js b/lib/ace/mode/tcl_highlight_rules.js index 5eda35be..25d72f2b 100644 --- a/lib/ace/mode/tcl_highlight_rules.js +++ b/lib/ace/mode/tcl_highlight_rules.js @@ -150,16 +150,16 @@ var TclHighlightRules = function() { }], "variable" : [ { - token : "variable.instancce", // variable xotcl with braces - regex : "(?:[:][:])?(?:[a-zA-Z_]|\d)+(?:(?:[:][:])?(?:[a-zA-Z_]|\d)+)?(?:[(](?:[a-zA-Z_]|\d)+[)])?", + token : "variable.instance", // variable xotcl with braces + regex : "(?:[:][:])?[a-zA-Z_\\d]+(?:(?:[:][:])?[a-zA-Z_\\d]+)?(?:[(][a-zA-Z_\\d]+[)])?", next : "start" }, { - token : "variable.instancce", // variable tcl - regex : "(?:[a-zA-Z_]|\d)+(?:[(](?:[a-zA-Z_]|\d)+[)])?", + token : "variable.instance", // variable tcl + regex : "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?", next : "start" }, { - token : "variable.instancce", // variable tcl with braces - regex : "{?(?:[a-zA-Z_]|\d)+}?", + token : "variable.instance", // variable tcl with braces + regex : "{?[a-zA-Z_\\d]+}?", next : "start" }], "qqstring" : [ {