(value: string | undefined)
| 15 | } |
| 16 | |
| 17 | function normalizePathLikeLabel(value: string | undefined): string { |
| 18 | if (!value) return ""; |
| 19 | const decoded = safeDecodeURIComponent(stripMarkdownPathBrackets(value)); |
| 20 | const withoutSubpath = decoded.split(/[#!^]/)[0] ?? decoded; |
| 21 | const withoutLeadingSlash = withoutSubpath.replace(/^\/+/, ""); |
| 22 | return withoutLeadingSlash.replace(/\.md$/i, "").trim(); |
| 23 | } |
| 24 | |
| 25 | function normalizeSubpathLabel(value: string | undefined): string { |
| 26 | if (!value) return ""; |
no test coverage detected