(linktext: string)
| 1051 | |
| 1052 | // Mock parseLinktext function based on official Obsidian API |
| 1053 | export function parseLinktext(linktext: string): { path: string; subpath: string } { |
| 1054 | // Handle subpath syntax: [[path#subpath]] |
| 1055 | const hashIndex = linktext.indexOf('#'); |
| 1056 | if (hashIndex !== -1) { |
| 1057 | return { |
| 1058 | path: linktext.slice(0, hashIndex).trim(), |
| 1059 | subpath: linktext.slice(hashIndex + 1).trim() |
| 1060 | }; |
| 1061 | } |
| 1062 | |
| 1063 | // Simple path: [[path]] |
| 1064 | return { |
| 1065 | path: linktext.trim(), |
| 1066 | subpath: '' |
| 1067 | }; |
| 1068 | } |
| 1069 | |
| 1070 | // Icon utilities |
| 1071 | export function setIcon(element: HTMLElement, iconName: string): void { |
no outgoing calls
no test coverage detected