Merge pull request #1954 from earth2marsh/patch-1

Isolate float regex matching to 1 char for + and -
This commit is contained in:
Harutyun Amirjanyan 2014-05-17 12:09:04 +02:00
commit 87a4e2666b

View file

@ -79,7 +79,7 @@ var YamlHighlightRules = function() {
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : "constant.numeric", // float
regex : /[+\-]?[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?\b/
regex : /(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)/
}, {
token : "constant.numeric", // other number
regex : /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/