Isolate float regex matching to 1 char for + and -
This prevents highlighting on the "2" in "auth: oauth2". (signing CLA and sending in now) Now passes tests and also covers .37 case. … and updated to cover the ++ or -- case.
This commit is contained in:
parent
4e9e553436
commit
05f0b3c7f2
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