npm / marky-markdown

npm's markdown parser
https://www.npmjs.com/package/@npmcorp/marky-markdown
405 stars 72 forks source link

[BUG] Should use githubusercontent for img tags as well as image markdown #450

Open tolmasky opened 3 years ago

tolmasky commented 3 years ago

What / Why

If you pass a package object to the options, it will helpfully take relative path images and point them at githubusercontent.com. However, if the user has used an img tag with a relative path, the same transformation is not applied. This leads to some images being broken on npmjs.com, while working fine on github. Here is one example of a package experiencing this (not mine):

https://www.npmjs.com/package/puppeteer-extra-plugin-stealth

It would be nice to apply this same rewriting to githubusercontent URL here.