improve number tokenizing in CSS

This commit is contained in:
Vlad Zinculescu 2012-11-26 16:54:46 +01:00
commit 9a29a99f26

View file

@ -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"],