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

Function parseLinkPath

src/utils/linkUtils.ts:6–10  ·  view source on GitHub ↗
(linkText: string)

Source from the content-addressed store, hash-verified

4const tasknotesLogger = createTaskNotesLogger({ tag: "Utils/LinkUtils" });
5
6function parseLinkPath(linkText: string): string {
7 const subpathIndex = linkText.search(/[#^]/);
8 const path = subpathIndex === -1 ? linkText : linkText.slice(0, subpathIndex);
9 return path.trim();
10}
11
12/**
13 * Parse a link string (wikilink or markdown) to extract the path.

Callers 2

parseLinkToPathFunction · 0.85
getProjectDisplayNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected