vscode-factoriomod-debug
vscode-factoriomod-debug copied to clipboard
Some URLs in MD are getting mangled when I publish.
I have the following line in my README.MD:
[](https://ko-fi.com/M4M2LCWTH) [](https://mods.factorio.com/mod/loaders-modernized)
That gets some characters escaped to this when I publish.
[](https://ko-fi.com/M4M2LCWTH) [](https://mods.factorio.com/mod/loaders-modernized)
I have to manually remove the '' from the links for them to display properly. Both of them seem to render here correctly, but the bottom one does not on the mod portal.
i've investigated this some and it does not seem to be any of the specific processing i'm doing that does this, but rather simply the act of passing it through remark. I've not yet pinned down exactly how or why they mangle links in this way or what to do about it though.
okay so apparently the deal is: escaped characters in the URL are apparently correct under CommonMark spec (and remark has closed it as not-a-bug previously, and it may actually be a mod portal bug that they're not handled correctly
https://babelmark.github.io/?text=%5B!%5Bshield%5D(https%3A%2F%2Fimg.shields.io%2Fbadge%2FKo--fi-Donate%2520-hotpink%3Flogo%3Dkofi%5C%26logoColor%3Dwhite)%5D(https%3A%2F%2Fko-fi.com%2FM4M2LCWTH)+%5B!%5Bshield%5D(https%3A%2F%2Fimg.shields.io%2Fbadge%2Fdynamic%2Fjson%3Fcolor%3Dorange%5C%26label%3DFactorio%5C%26query%3Ddownloads_count%5C%26suffix%3D%2520downloads%5C%26url%3Dhttps%253A%252F%252Fmods.factorio.com%252Fapi%252Fmods%252Floaders-modernized)%5D(https%3A%2F%2Fmods.factorio.com%2Fmod%2Floaders-modernized) shows almost all implementations handle this correctly - but not python-markdown, which i believe is what the portal uses
Then does that mean a bug needs to be filed against the mod portal?
next release will have this only-slightly-cursed fix to just stop escaping the & entirely https://github.com/justarandomgeek/vscode-factoriomod-debug/commit/43850bfbddd8a9c437847ce74bbdaff90c682a65