Better solution for link relativization
See #5 for background.
This is the awful, awful hack: https://github.com/LeaVerou/lea.verou.me/blob/main/assets/filters.cjs#L18-L33
Would be nice to eventually move towards something that doesn't involve running regex on HTML 🫣
Could you elaborate which parsing bugs you encountered with mardkdown-it-replace-link? I just tried your original approach (a little adapted), and it seems to work pretty well.
Edit: Ah, I just found one such rendering issue. With html in markdowns, e.g. xyz renders to xyz, when markdown-it-replace-link is active with the option "processHTML" set. I've opened an issue here: https://github.com/martinheidegger/markdown-it-replace-link/issues/8#issue-1970801663.