Skip to content

Doesn't handle txn and posting tags/links #3

Description

@tbm

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions