* Extract wikilink path from [[...]] format, handling alias syntax
(projectValue: string)
| 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 |
no test coverage detected