@@ -3482,6 +3482,7 @@ they can express many matchers and field assignments in a more compact tabular f
3482
3482
if,HLEDGERFIELD1,HLEDGERFIELD2,...
3483
3483
MATCHERA,VALUE1,VALUE2,...
3484
3484
MATCHERB,VALUE1,VALUE2,...
3485
+ ; Comment line that explains MATCHERC
3485
3486
MATCHERC,VALUE1,VALUE2,...
3486
3487
<empty line>
3487
3488
```
@@ -3493,13 +3494,15 @@ It should be a non-alphanumeric character like `,` or `|` that does not appear a
3493
3494
3494
3495
Each line must contain the same number of separators; empty values are allowed.
3495
3496
Whitespace can be used in the matcher lines for readability (but not in the if line, currently).
3497
+ You can use the comment lines in the table body.
3496
3498
The table must be terminated by an empty line (or end of file).
3497
3499
3498
3500
An if table like the above is interpreted as follows:
3499
3501
try all of the matchers;
3500
3502
whenever a matcher succeeds, assign all of the values on that line to the corresponding hledger fields;
3501
- later lines can overrider earlier ones.
3502
- It is equivalent to this sequence of if blocks:
3503
+ If multiple lines match, later lines will override fields assigned by the earlier ones - just like the sequence of ` if ` blocks would behave.
3504
+
3505
+ If table presented above is equivalent to this sequence of if blocks:
3503
3506
3504
3507
``` rules
3505
3508
if MATCHERA
@@ -3512,6 +3515,7 @@ if MATCHERB
3512
3515
HLEDGERFIELD2 VALUE2
3513
3516
...
3514
3517
3518
+ ; Comment line which explains MATCHERC
3515
3519
if MATCHERC
3516
3520
HLEDGERFIELD1 VALUE1
3517
3521
HLEDGERFIELD2 VALUE2
@@ -3523,6 +3527,7 @@ Example:
3523
3527
if,account2,comment
3524
3528
atm transaction fee,expenses:business:banking,deductible? check it
3525
3529
%description groceries,expenses:groceries,
3530
+ ;; Comment line that desribes why this particular date is special
3526
3531
2023/01/12.*Plumbing LLC,expenses:house:upkeep,emergency plumbing call-out
3527
3532
```
3528
3533
0 commit comments