Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Relative image URLs in package READMEs are now resolved correctly #996
Description of the Change
When rendering package READMEs, whilst sanitizing the source image, URLs are now checked to see if they are absolute or relative and if they are relative then they are resolved appropriately. For example for non-installed plugins the base URL would be the GitHub repo however if they are installed it uses the path of the installed plugin.
I considered attempting to match up each image in the Markdown with its counterpart on its Atom.io page or its README on GitHub and using those URLs. I chose this solution in the end as it was much simpler and in the cases I've tested still seems to work.
Packages using relative URLs for images in their README files as recommended by GitHub will now be rendered correctly
Any URL scheme not recognized by the code I have written will be assumed to be a relative path so the image URL may be altered incorrectly.
The applicable issue would be here
referenced this pull request
Sep 14, 2017
@nathansobo Just so that you're aware of my last review comment that we're not sure how to resolve:
@50Wliu Hey, sorry, I missed your comment somehow before merging this