lea.verou.me icon indicating copy to clipboard operation
lea.verou.me copied to clipboard

Better solution for link relativization

Open LeaVerou opened this issue 2 years ago • 1 comments

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 🫣

LeaVerou avatar Jul 18 '23 11:07 LeaVerou

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.

noboevbo avatar Oct 30 '23 10:10 noboevbo