From 9a29a99f267646cef9dedbf14b1c74df1d1fc382 Mon Sep 17 00:00:00 2001 From: Vlad Zinculescu Date: Mon, 26 Nov 2012 16:54:46 +0100 Subject: [PATCH] improve number tokenizing in CSS --- lib/ace/mode/css_highlight_rules.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ace/mode/css_highlight_rules.js b/lib/ace/mode/css_highlight_rules.js index 17ad7f1d..40d4e293 100644 --- a/lib/ace/mode/css_highlight_rules.js +++ b/lib/ace/mode/css_highlight_rules.js @@ -77,12 +77,12 @@ var CssHighlightRules = function() { regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" }, { token : ["constant.numeric"], - regex : "([0-9]+)" + regex : numRe }, { - token : "constant.numeric", // hex6 color + token : "constant.numeric.color.hex", // hex6 color regex : "#[a-f0-9]{6}" }, { - token : "constant.numeric", // hex3 color + token : "constant.numeric.color.hex", // hex3 color regex : "#[a-f0-9]{3}" }, { token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],