diff options
| author | Jason A. Dönerfield <no-replay@sl0p.foo> | 2026-07-18 20:50:31 +0200 |
|---|---|---|
| committer | Jason A. Dönerfield <no-replay@sl0p.foo> | 2026-07-18 21:31:00 +0200 |
| commit | 1be367f87b22ae4f43e68dd3ef600e1ee4b30c44 (patch) | |
| tree | 12137fb033be276ae2d02f899840a2d65fe0a24d /cmd.c | |
| parent | md2html: let bullet/1. lists interrupt paragraphs (GitHub-style) (diff) | |
| download | cgit-1be367f87b22ae4f43e68dd3ef600e1ee4b30c44.tar.gz cgit-1be367f87b22ae4f43e68dd3ef600e1ee4b30c44.tar.xz cgit-1be367f87b22ae4f43e68dd3ef600e1ee4b30c44.zip | |
md2html: rewrite relative README links to the tree/ blob URL
The image-rewrite patch only fixed relative <img src>; relative <a href>
links (e.g. [docs/x.md](docs/x.md)) were still resolved by the browser
against the about/summary page URL, not the repo root, so they 404d.
Rewrite relative <a href> to absolute cgit URLs the same way:
in-repo path -> /<repo>/tree/<path>?h=<branch>
../sibling -> resolved against the repo URL location (/<sibling>)
Fragments are preserved; anchors, absolute, scheme and query-only URLs
are left untouched.
Diffstat (limited to 'cmd.c')
0 files changed, 0 insertions, 0 deletions
