(url = "")
| 45 | } |
| 46 | |
| 47 | function isInternalDocLink(url = "") { |
| 48 | if (!url) return false; |
| 49 | if (isExternalUrl(url)) return false; |
| 50 | if (!url.startsWith("/")) return false; |
| 51 | if (url.startsWith("/media/")) return false; |
| 52 | const { path: p } = stripQueryAndHash(url); |
| 53 | return p.endsWith(".md") || p.endsWith(".mdx"); |
| 54 | } |
| 55 | |
| 56 | function toTargetRel(url = "") { |
| 57 | return stripQueryAndHash(url).path.replace(/^\/+/, ""); |
no test coverage detected