Merge pull request #1954 from earth2marsh/patch-1
Isolate float regex matching to 1 char for + and -
This commit is contained in:
commit
87a4e2666b
1 changed files with 1 additions and 1 deletions
|
|
@ -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_]+/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue