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
fix(tables): let the separator decide a lone-separator amount, not the marker
Greptile blocked on `$1.234` reading as 1234, and offered the alternative of
stating the input contract explicitly. Looking for a precedent settled it
against me: a spreadsheet with a USD-formatted cell stores a typed `1.234` as
1.234 and displays $1.23. Reinterpreting it as one thousand two hundred
thirty-four is a thousandfold surprise, and my defense of it was wrong.
The rule now keys on the separator, tempered by what the currency can express:
- A dot is the decimal point in the notation most people type, so it stays a
decimal — except for a currency with no decimal places, where `1.235 ¥`
cannot be a fraction of a yen and is the one lone-separator form a formatter
actually emits.
- A comma is grouping by convention (`1,500` is fifteen hundred), except for a
three-decimal currency, where `0,500` is a half.
A currency with one or two decimal places always formats with both separators,
so no formatter output is decided here at all.
This also drops the `hadMarker` signal entirely — once the separator and the
currency answer the question, where the string came from stops mattering.
0 commit comments