Commit 2f24e2e
fix(links): decode percent-encoding when resolving markdown links
Hand-written `.md` links sometimes URL-encode spaces (e.g.
`../My%20Page.md`). The link rewriter keyed the link map on raw relative
paths (literal spaces), so encoded links failed the lookup and were left
pointing at a non-existent `.md` URL. Decode the link path with
Uri.UnescapeDataString before normalizing so both literal-space and
`%20`-encoded links resolve to the correct (optionally slugified) target.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 45f5701 commit 2f24e2e
2 files changed
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
371 | 397 | | |
0 commit comments