(task: TaskInfo, plugin?: TaskNotesPlugin)
| 50 | } |
| 51 | |
| 52 | export function taskHasDetails(task: TaskInfo, plugin?: TaskNotesPlugin): boolean { |
| 53 | if (typeof task.details === "string") { |
| 54 | return task.details.trim().length > 0; |
| 55 | } |
| 56 | |
| 57 | if (!plugin || !task.path) { |
| 58 | return false; |
| 59 | } |
| 60 | |
| 61 | const sections = plugin.app.metadataCache.getCache?.(task.path)?.sections; |
| 62 | if (!sections) { |
| 63 | return false; |
| 64 | } |
| 65 | |
| 66 | return sections.some((section) => section.type !== "yaml"); |
| 67 | } |
| 68 | |
| 69 | export function shouldStrikeThroughCompletedTasks(plugin: TaskNotesPlugin): boolean { |
| 70 | return plugin.settings?.showCompletedTaskStrikethrough !== false; |
no test coverage detected