Skip to content

Commit

Permalink
Merge pull request #56 from tmr232/github-url-parsing
Browse files Browse the repository at this point in the history
render-page: Fix GitHub URL parsing
  • Loading branch information
tmr232 authored Jan 8, 2025
2 parents ea8a655 + 9fad01f commit 3a5a559
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}
const rawUrl = githubURL.replace(
/(?<host>https:\/\/github.com\/)(?<project>\w+\/\w+\/)(blob\/)(?<path>.*)(#L\d+)/,
/(?<host>https:\/\/github.com\/)(?<project>[^/]+\/[^/]+\/)(blob\/)(?<path>.*)(#L\d+)/,
"https://raw.githubusercontent.com/$<project>$<path>",
);
Expand Down

0 comments on commit 3a5a559

Please sign in to comment.