Closed netomi closed 1 year ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
This PR fixes format when using the general format type and passing a value of 0 like that
jsonnet -e "std.format('%g', [0])"
or
jsonnet -e "'%g' % 0"
It basically adds a safeguard when calculating the exponent for the given value. 0 has to be treated differently as log is not undefined for 0.