MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / getResolvedFileTitle

Function getResolvedFileTitle

src/utils/linkUtils.ts:153–161  ·  view source on GitHub ↗
(file: TFile, app?: App)

Source from the content-addressed store, hash-verified

151}
152
153function 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
163function shouldUseResolvedTitle(
164 displayText: string | undefined,

Callers 1

Calls 2

getFileCacheMethod · 0.80
getCacheMethod · 0.80

Tested by

no test coverage detected