Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for note sub-directive in commodity definition #1945

Open
alensiljak opened this issue Nov 4, 2022 · 3 comments
Open

Support for note sub-directive in commodity definition #1945

alensiljak opened this issue Nov 4, 2022 · 3 comments
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea.

Comments

@alensiljak
Copy link

alensiljak commented Nov 4, 2022

I am trying to run hledger on my book file(s) and am getting

  |
6 |         note Euro
  |         ^^^^^^
unexpected "note E"
expecting "format"

for the commodity definition

commodity EUR
	note Euro
	format 1,000.00 EUR

Are the sub-commands supported for commodities? I'd like to be able to use my ledger files directly, for compatibility and cross-checking reasons.

I will keep this issue specific to the "note" subdirective. The use case is extremely simple. This directive can be safely ignored. It would be enough not to throw exceptions during parsing. The information is not used anywhere else, as far as I am aware.

Related: #1795

A workaround, due to the simplicity of the sub-directive, is to comment-out the note lines in commodity definitions.

@alensiljak alensiljak added the A-WISH Some kind of improvement request, hare-brained proposal, or plea. label Nov 4, 2022
@alensiljak
Copy link
Author

linking #258

@alensiljak
Copy link
Author

I believe the key is adding an option to parse note sub-directive here.

@alensiljak
Copy link
Author

alensiljak commented Nov 7, 2022

Adding account subdirectives for reference, as pointed out by Simon, in order to compare the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea.
Projects
None yet
Development

No branches or pull requests

1 participant