(rawValue: string, plugin: CodeSpacePlugin)
| 325 | } |
| 326 | |
| 327 | function normalizeSourcePathCandidate(rawValue: string, plugin: CodeSpacePlugin): string { |
| 328 | const normalized = normalizePath(rawValue.replace(/\\/g, "/").trim()); |
| 329 | if (!normalized) return ""; |
| 330 | const abstractFile = plugin.app.vault.getAbstractFileByPath(normalized); |
| 331 | return abstractFile instanceof TFile ? abstractFile.path : ""; |
| 332 | } |
| 333 | |
| 334 | function resolveSourcePathFromAncestors(embedEl: HTMLElement, plugin: CodeSpacePlugin): string { |
| 335 | for (let current: HTMLElement | null = embedEl; current; current = current.parentElement) { |
no test coverage detected