howeyc / ledger

Command line double-entry accounting program
https://howeyc.github.io/ledger/
ISC License
461 stars 43 forks source link

fix: parse decimals without whole portion #53

Closed jrick closed 1 year ago

jrick commented 1 year ago

When an transaction entry contains a decimal amount with no whole portion specified, assume the whole part is zero.

This avoids creating additional accounts from misparsed transactions, where the account name otherwise contained the decimal portion at the end.

howeyc commented 1 year ago

I'm good with the change, but what about something like "-.34", should that be handled?

jrick commented 1 year ago

Yes, that seems reasonable as well.