simonmichael · GitHub

With a journal containing only the below, the amount is parsed as 1. I think (hope) no country uses space for decimal point, so we should prevent this:

2018-01-01
  (a)   USD1 000
;$ hledger -f d.j reg amt:1
;2018/01/01                      (a)                       USD1 000      USD1 000

And possibly the same issue, the following commodity directive should complain about a missing decimal point (now required), instead it gives a parse error:

commodity 1 000  USD
2018-01-01
  (a)   USD1 000
; hledger: d.j:1:12:
; unexpected space
; expecting digit

A correct commodity directive does work as intended:

commodity 1 000.00  USD
2018-01-01
  (a)   USD1 000
;$ hledger -f d.j reg amt:1000
;2018/01/01                      (a)                   1 000.00 USD  1 000.00 USD

Read the original on github.com ↗