ledger icon indicating copy to clipboard operation
ledger copied to clipboard

unexpected itemEOL("\n") in amount

Open aquilax opened this issue 8 years ago • 2 comments

Hi, great work on the parser:

I'm geting the following error when trying to use it:

$ cat test.dat 
; vim: ft=ledger:sts=2:expandtab:indentexpr=

2015/03/02 Arlanda
  Раз:Услуги:Транспорт:Такси  675
  Кап:ING

$ cat test.dat | ledger2json 
2017/01/01 12:52:18 Parsing error: ledger: stdin:4: unexpected itemEOL("\n") in amount

aquilax avatar Jan 01 '17 11:01 aquilax

Hmm, is it possible to have no commodity attached to the amount? Perhaps my parser didn't support that.

abourget avatar Dec 22 '21 21:12 abourget

It is supported by ledger-cli

$ ledger -f test.dat print
2015/03/02 Arlanda
    Раз:Услуги:Транспорт:Такси                   675
    Кап:ING

I feel it's one of those cases where the reference format is too lax which makes re-implementing all the edge cases a journey

aquilax avatar Dec 23 '21 03:12 aquilax