Skip to content

Commit

Permalink
also treat floats starting with dot as numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnester committed Jun 22, 2022
1 parent 049d761 commit e130e89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ace/mode/yaml_highlight_rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ var YamlHighlightRules = function() {
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : "constant.numeric", // float
regex : /(\b|[+\-])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/
regex : /(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/
}, {
token : "constant.numeric", // other number
regex : /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/
Expand Down

0 comments on commit e130e89

Please sign in to comment.