mrjackphil / obsidian-text-expand

A simple text expand plugin for Obsidian.md
186 stars 12 forks source link

Matching task-todo: cant pull immediate headers #43

Open QuaCKeReD opened 3 years ago

QuaCKeReD commented 3 years ago

Trying to pull all task-todo: from a list of files, along with their immediate '#' header values;

code:

(task-todo:"") (file:"ToDo test")
$filename
$header:#
$match

expected output;

[[ToDo test 1#Heading 1]]
- [ ] task under heading 1
- [ ] another task under heading 1
[[ToDo test 1#Heading 2]]
- [ ] task under heading 2
[[ToDo test 1#Heading 3]]
- [ ] task under heading 3

actual output;

[[ToDo test 1#Heading 1]]
[[ToDo test 1#Heading 2]]
[[ToDo test 1#Heading 3]]
- [ ] task under heading 1
- [ ] another task under heading 1
- [ ] task under heading 2
- [ ] task under heading 3
mrjackphil commented 3 years ago

@QuaCKeReD thanks for the issue. I'll check when will have some time.

visualcurrent commented 4 months ago

One thing that seems missing from this plugin is a Special Sequence that provides only the single, linked, header for which the $match exists under.

This would allow us to click through much more closely to the source of the result.

It would be more amazing if there was a way to click though directly to the line of the source of the result. I suspect that might not be so simple (even though Obsidian search results offer this feature).

Without knowing how you coded this, the nearest header seems more doable and would probably be good enough.