fix(parse): position-independent inline metadata parsing
Problem: `parse.body()` scanned tokens right-to-left and broke on the first non-metadata token, so metadata only worked at the trailing end of a line. `due:tomorrow Fix the bug` silently failed to parse the due date. Solution: Replace the right-to-left `while` loop with a single left-to-right pass that extracts metadata tokens from any position. Duplicate metadata tokens are dropped with a `log.warn`. Update docs and tests accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e816e6fb7e
commit
ed0b72feee
3 changed files with 33 additions and 3 deletions
|
|
@ -664,7 +664,7 @@ On `:w`, the description becomes `Buy milk`, the due date is stored as
|
|||
placed under the `Errands` category header.
|
||||
|
||||
Only the first occurrence of each metadata type is consumed — duplicate
|
||||
tokens are silently dropped.
|
||||
tokens are dropped with a warning.
|
||||
|
||||
Omnifunc completion is available for `due:`, `cat:`, and `rec:` token types.
|
||||
In insert mode, type the token prefix and press `<C-x><C-o>` to see
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue