Auto-suggest for dependencies restricts the characters that can be used when filtering task descriptions #2827
Closed
2 of 7 tasks
Labels
scope: auto-suggest
The pop-up menu that helps with editing tasks directly in markdown notes
scope: task dependencies
Anything to do with making tasks aware of other tasks
type: bug
Something isn't working
Please check that this issue hasn't been reported before.
Expected Behavior
When using auto-suggest to add tasks to the dependsOn field, I would sometimes like to use hyphen, underscore and punctuation in my searches.
Other users may want to search for letters with accents, non-Latin characters.
Current behaviour
The characters recognised when searching task descriptions are defined here:
obsidian-tasks/src/Suggestor/Suggestor.ts
Line 446 in bcee94a
The current options are:
[0-9a-zA-Z ^,]
Steps to reproduce
[space]dep
caf
- note that first task is in the suggestions listé
- note that the first task disappears from the suggestions listWhich Operating Systems are you using?
Obsidian Version
1.6.0
Tasks Plugin Version
pre-7.2.0 development release
Checks
Possible solution
I tried just increasing the range of characters allowed in the above regex, but then found that if the cursor was after
dependsOn
in the middle of an existing line, such as with a due date afterwards, the later text in the line was included in the filtering of tasks to add to the suggest drop-down, which usually meant that no tasks were found.I think the regex is going to need to be changed to something like:
[]()
in case it's dataview formatThis is going to be rather hard to write automated tests for, due to all the positioning of cursors required...
The text was updated successfully, but these errors were encountered: