Skip to content

Fix URL replacement for GitHub paths - #166

Open
Orange-Icepop wants to merge 1 commit into
hunshcn:masterfrom
Orange-Icepop:gh-jsdelivr-raw-fix
Open

Fix URL replacement for GitHub paths#166
Orange-Icepop wants to merge 1 commit into
hunshcn:masterfrom
Orange-Icepop:gh-jsdelivr-raw-fix

Conversation

@Orange-Icepop

Copy link
Copy Markdown

Change the matching function to correct response when downloading files from raw.
eg. If the target URL is:
https://github.com/Trystan-SA/rproc/raw/v0.3.7/packaging/icons/hicolor/scalable/apps/io.github.trystan_sa.rproc.svg
the original code will return:
https://cdn.jsdelivr.net/gh/Trystan-SA/rproc/raw/v0.3.7/packaging/icons/hicolor/scalable/apps/io.github.trystan_sa.rproc.svg
which is incorrect. The corrected URL is:
https://cdn.jsdelivr.net/gh/Trystan-SA/rproc@v0.3.7/packaging/icons/hicolor/scalable/apps/io.github.trystan_sa.rproc.svg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant