You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
PR #171 restricted the possible float syntax, but it's not clear that it was the right thing to do.
The YAML spec itself provides a regexp for floats (-?[1-9](\.[0-9]*[1-9])?(e[-+][1-9][0-9]*)?) that is cast into doubt by the example immediately following (2.3e4) which is not matched by the regexp.
Also, JSON allows floats of the form 2e5 and YAML is supposed to be able to read JSON.
As it seems other implementations treat [0-9]+e[0-9]+ as a string, perhaps we should do that too, despite JSON-incompatibility, but treat it as a float if there's a decimal point in the mantissa or a + or - sign before the exponent.
PR #171 restricted the possible float syntax, but it's not clear that it was the right thing to do.
The YAML spec itself provides a regexp for floats (
-?[1-9](\.[0-9]*[1-9])?(e[-+][1-9][0-9]*)?) that is cast into doubt by the example immediately following (2.3e4) which is not matched by the regexp.Also, JSON allows floats of the form
2e5and YAML is supposed to be able to read JSON.As it seems other implementations treat
[0-9]+e[0-9]+as a string, perhaps we should do that too, despite JSON-incompatibility, but treat it as a float if there's a decimal point in the mantissa or a + or - sign before the exponent.