MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / extractTaskLinkSubpath

Function extractTaskLinkSubpath

src/editor/taskLinkDisplayText.ts:37–43  ·  view source on GitHub ↗
(linkPath: string | undefined)

Source from the content-addressed store, hash-verified

35}
36
37export function extractTaskLinkSubpath(linkPath: string | undefined): string | undefined {
38 if (!linkPath) return undefined;
39 const decoded = safeDecodeURIComponent(stripMarkdownPathBrackets(linkPath));
40 const subpathIndex = decoded.search(/[#^]/);
41 if (subpathIndex === -1) return undefined;
42 return normalizeSubpathLabel(decoded.slice(subpathIndex)) || undefined;
43}
44
45export function formatTaskLinkSubpathDisplayText(
46 taskTitle: string | undefined,

Calls 3

normalizeSubpathLabelFunction · 0.85
safeDecodeURIComponentFunction · 0.70

Tested by

no test coverage detected