( editor: Editor, detectionService: TaskLinkDetectionServiceInstance )
| 1724 | } |
| 1725 | |
| 1726 | private getTaskLinkAtCursor( |
| 1727 | editor: Editor, |
| 1728 | detectionService: TaskLinkDetectionServiceInstance |
| 1729 | ): TaskLinkMatch | null { |
| 1730 | const cursor = editor.getCursor(); |
| 1731 | const line = editor.getLine(cursor.line); |
| 1732 | const links = detectionService.findWikilinks(line); |
| 1733 | |
| 1734 | return ( |
| 1735 | links.find( |
| 1736 | (link) => |
| 1737 | cursor.ch >= link.start && |
| 1738 | cursor.ch <= link.end && |
| 1739 | (link.type === "wikilink" || link.type === "markdown") |
| 1740 | ) ?? null |
| 1741 | ); |
| 1742 | } |
| 1743 | |
| 1744 | private async openTaskEditModalForFile(file: TFile, notTaskNotice?: string): Promise<void> { |
| 1745 | try { |
no test coverage detected