-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
It seems bean-black doesn't handle #tags that are on the txn level:
lark.exceptions.UnexpectedCharacters: No terminal matches '#' in the current parser context, at line 14 col 3
#opening-balance
^
Expected one of:
* FLAG
* SECTION_HEADER
* DATE
* METADATA_KEY
* ACCOUNT
* COMMENT
...
File "/home/tbm/.local/lib/python3.9/site-packages/lark/lexer.py", line 537, in lex
raise UnexpectedToken(token, e.allowed, state=parser_state, token_history=[last_token], terminals_by_name=self.root_lexer.terminals_by_name)
lark.exceptions.UnexpectedToken: Unexpected token Token('TAGS', '#opening-balance') at line 14, column 3.
Test case:
2000-01-01 open Assets:Cash
2000-01-01 open Equity:Opening-Balance
2022-01-01 * "Opening balance: cash"
#opening-balance
Assets:Cash 10.00 EUR
Equity:Opening-Balance
Metadata
Metadata
Assignees
Labels
No labels