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

Parser shouldn't allow account starting with semicolon #1753

Closed
tbm opened this issue Jan 29, 2019 · 0 comments
Closed

Parser shouldn't allow account starting with semicolon #1753

tbm opened this issue Jan 29, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@tbm
Copy link
Contributor

tbm commented Jan 29, 2019

ledger is quite permissive in terms of what it accepts as account names - pretty much anything as long as it's followed by two spaces or a tab (or a newline). Account names may contain semicolons.

However, account names can't start with a semicolon... because that would be parsed as a comment instead. That makes sense.

Simple, right.

Except that ledger accepts an account name starting with a semicolon when you put a flag in front:

2018-01-02 * Account name starting with semicolon
    * ;A        10.00 EUR
    B
ledger -f c bal a
           10.00 EUR  ;A

This should be rejected.

@tbm tbm added the bug Something isn't working label Jan 29, 2019
mbudde added a commit to mbudde/ledger that referenced this issue Feb 23, 2019
mbudde added a commit to mbudde/ledger that referenced this issue Feb 23, 2019
deild pushed a commit to deild/ledger that referenced this issue Mar 16, 2019
@tbm tbm closed this as completed in 13044f9 Mar 30, 2019
bkuhn pushed a commit to bkuhn/ledger that referenced this issue Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant