Skip to content

Commit c6d437f

Browse files
committed
adds section about heading tags to readme
1 parent 027b980 commit c6d437f

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ a completed task | | | 20241010-foo.md | 20241010
149149

150150
### Frontmatter tags
151151

152-
Tags will also be inherited from any YAML front-matter:
152+
If present, tags will be inherited from any YAML front-matter:
153153

154154
```markdown
155155
---
@@ -176,8 +176,8 @@ a completed task | foo | bar | 20241010-foo.md | 20241010
176176

177177
### Metadata file tags
178178

179-
Tags will also be inherited from any per-folder `.taskparser.yaml` files
180-
present in the folder hierarchy leading to a markdown file:
179+
If present, tags will be inherited from any per-folder `.taskparser.yaml` files
180+
throughout the folder hierarchy leading to a markdown file:
181181

182182
Tags **must** be expressed through a simple, root-level `tags` dictionary:
183183

@@ -187,6 +187,36 @@ tags:
187187
client: bar
188188
```
189189
190+
## Heading tags
191+
192+
If present, tags will be inherited from headings. Each sub-heading may override
193+
tags from parent headings.
194+
195+
```markdown
196+
# #client(foo)
197+
198+
## #project(bar)
199+
200+
- [ ] a pending task
201+
202+
## #project(baz)
203+
204+
- [X] a completed task
205+
```
206+
207+
`taskparser` will produce:
208+
209+
```
210+
$ taskparser -t text,project,client,file,date /foo/bar
211+
```
212+
213+
```
214+
text | project | client | file | date
215+
--- | --- | --- | --- | ---
216+
a pending task | bar | foo | 20241010-foo.md | 20241010
217+
a completed task | baz | foo | 20241010-foo.md | 20241010
218+
```
219+
190220
### Filtering by tag
191221
192222
`taskparser` accepts filter expression via the `-f` argument:

0 commit comments

Comments
 (0)