From 99e8eb9a53809aecae3ee339c44bbc21168c913a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 6 Dec 2022 06:42:37 -1000 Subject: [PATCH] ;doc: tags: fix/clarify --- hledger/hledger.m4.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index 870f516f6..910b15a8d 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -2352,6 +2352,7 @@ Tags are inherited, as follows: - Tags on an account affect all postings to that account. So in the example above, + - the `assets:checking` account has one tag (`accounttag`) - the transaction has two tags (`transaction-tag`, `another-transaction-tag`) - the `assets:checking` posting has three tags (`transaction-tag`, `another-transaction-tag`, `accounttag`) @@ -2359,13 +2360,15 @@ So in the example above, Tags can have a value, which is the text after the colon, until the next comma or end of line, with surrounding whitespace stripped. -So here `a-posting-tag`'s value is "the tag value", `tag2`'s value is "foo", -and `tag3`'s value is "" (the empty string): +Note this means that hledger tag values may not contain commas. +For example, in this posting: ```journal - expenses:food $10 - ; some text, a-posting-tag:the tag value, tag2: foo , tag3: , other text + expenses:food $10 ; foo, tag1: value 1 , tag2:value 2, bar tag3: , baz ``` -A hledger tag value may not contain a comma. + +- `tag1`'s value is "value 1" +- `tag2`'s value is "value 2" +- `tag3`'s value is "" (the empty string) ## Postings