(p: string)
| 220 | } |
| 221 | |
| 222 | function normalizeAbsToRel(p: string): string { |
| 223 | const m = p.match(/\/(wiki|raw|my_thoughts|exports)\/(.+)$/); |
| 224 | if (m) return `${m[1]}/${m[2]}`; |
| 225 | return p.replace(/\\/g, "/").replace(/^\.?\/+/, ""); |
| 226 | } |
| 227 | |
| 228 | function basename(p: string): string { |
| 229 | const seg = p.split("/").pop() || p; |