From 869e1f86aad6cf31a8fe3a0c6b477b871d3fcdbd Mon Sep 17 00:00:00 2001 From: nightwing Date: Sat, 14 Dec 2013 19:37:24 +0400 Subject: [PATCH] cleanup d mode --- lib/ace/mode/d_highlight_rules.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ace/mode/d_highlight_rules.js b/lib/ace/mode/d_highlight_rules.js index b0a0923e..843bcec6 100644 --- a/lib/ace/mode/d_highlight_rules.js +++ b/lib/ace/mode/d_highlight_rules.js @@ -191,7 +191,7 @@ var DHighlightRules = function() { "star-comment" : [ { token : "comment", // closing comment - regex : ".*?\\*\\/", + regex : "\\*\\/", next : "start" }, { defaultToken: 'comment' @@ -200,7 +200,7 @@ var DHighlightRules = function() { "plus-comment" : [ { token : "comment", // closing comment - regex : ".*?\\+\\/", + regex : "\\+\\/", next : "start" }, { defaultToken: 'comment' @@ -211,7 +211,7 @@ var DHighlightRules = function() { stringEscapesSeq, { token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"[cdw]?', + regex : '"[cdw]?', next : "start" }, { defaultToken: 'string' @@ -222,7 +222,7 @@ var DHighlightRules = function() { stringEscapesSeq, { token : "string", - regex : '(?:(?:\\\\.)|(?:[^`\\\\]))*?`[cdw]?', + regex : '`[cdw]?', next : "start" }, { defaultToken: 'string' @@ -234,7 +234,7 @@ var DHighlightRules = function() { onMatch: function(value, currentState, state) { value = value.substring(value.length-2, value.length-1); var map = {'>':'<',']':'[',')':'(','}':'{'}; - if(Object.keys(map).indexOf(value) != -1) + if(Object.keys(map).indexOf(value) != -1) value = map[value]; if(value != state[1]) return "string"; state.shift();