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

Method extractWikilinkPath

src/views/StatsView.ts:590–604  ·  view source on GitHub ↗

* Extract wikilink path from [[...]] format, handling alias syntax

(projectValue: string)

Source from the content-addressed store, hash-verified

588 * Extract wikilink path from [[...]] format, handling alias syntax
589 */
590 private extractWikilinkPath(projectValue: string): string | null {
591 if (
592 !projectValue ||
593 typeof projectValue !== "string" ||
594 !projectValue.startsWith("[[") ||
595 !projectValue.endsWith("]]")
596 ) {
597 return null;
598 }
599
600 const linkContent = projectValue.slice(2, -2);
601
602 // Use Obsidian's parseLinktext to handle aliases properly
603 return parseLinktext(linkContent).path;
604 }
605
606 /**
607 * Extract clean project name from various formats

Callers 1

Calls 1

parseLinktextFunction · 0.90

Tested by

no test coverage detected