(documentPath = "", target = "")
| 93 | } |
| 94 | |
| 95 | export function resolveDocumentRelativePath(documentPath = "", target = "") { |
| 96 | const value = String(target || "").trim(); |
| 97 | if (!value) return ""; |
| 98 | if (value.startsWith("/")) return normalizePath(value); |
| 99 | const base = parentPath(documentPath); |
| 100 | return normalizePath(`${base}/${value}`); |
| 101 | } |
| 102 | |
| 103 | export function splitHref(href = "") { |
| 104 | const value = String(href || "").trim(); |
no test coverage detected