The absolute directory that holds notes for a given top-level * folder, taking the vault's primaryNotesLocation into account.
(root: string, folder: NoteFolder)
| 142 | /** The absolute directory that holds notes for a given top-level |
| 143 | * folder, taking the vault's primaryNotesLocation into account. */ |
| 144 | async function folderRoot(root: string, folder: NoteFolder): Promise<string> { |
| 145 | if (folder !== 'inbox') return path.join(root, folder) |
| 146 | const primary = await readPrimaryNotesLocation(root) |
| 147 | return primary === 'root' ? root : path.join(root, 'inbox') |
| 148 | } |
| 149 | |
| 150 | const FENCE_LINE_RE = /^(\s{0,3})(`{3,}|~{3,})/ |
| 151 | const TASK_LINE_RE = /^\s*[-*+]\s+\[([ xX])\](.*)$/ |
no test coverage detected