(file: TFile, app?: App)
| 151 | } |
| 152 | |
| 153 | function getResolvedFileTitle(file: TFile, app?: App): string | null { |
| 154 | const cache = |
| 155 | app?.metadataCache.getFileCache(file) ?? |
| 156 | ( |
| 157 | app?.metadataCache |
| 158 | )?.getCache?.(file.path); |
| 159 | const title = cache?.frontmatter?.title; |
| 160 | return typeof title === "string" && title.trim().length > 0 ? title.trim() : null; |
| 161 | } |
| 162 | |
| 163 | function shouldUseResolvedTitle( |
| 164 | displayText: string | undefined, |
no test coverage detected