Trailing whitespace in fields is causing my CSV import to fail in 0.20:
➜ Downloads hledger -f Export.csv print --rules-file=~/.hledger/Export.rules
using conversion rules file /home/spang/.hledger/Export.rules
2013/01/03 ATM SURCHARGE FEE REIMBURSEMENT $-5.00
hledger: error: could not parse "$5.00 " as an amount
the CSV record is: "1098", "03/01/2013", "REV FEE", "ATM SURCHARGE FEE REIMBURSEMENT $-5.00", "", "5.00 ", "[redacted]", "", ""
the amount rule is:
the currency rule is: $
the default-currency is: unspecified
the parse error is: (line 1, column 7):
unexpected end of input
you may need to change your amount, currency or default-currency rules, or add a skip rule
This didn't used to be a problem for me in 0.18 and below! This affects blank fields that have an erroneous space character between commas as well.
I know this is poor CSV formatting, but this is what my bank generates and hledger ought to be able to deal with it.
parsing: don't fail when a csv amount has trailing whitespace (fixes #…