This repository has been archived by the owner on Jun 23, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
974a3b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the changelog mentions this as
You could replace
/blob/
with/raw/
. And to be safe:else it would also filter any directory named
blob
, e.g. withhttps://github.com/foo/bar/raw/some/blob/file.txt
.974a3b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also acceptable because we need the URL that points to the raw content.
This URL points to the content after being processed by GitHub (a web page), so it is not acceptable.
974a3b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's clear. But
.+
is "greedy". Inr"https://github\.com/.+/blob/.+"
the first.+
matches any number of directory levels – not justowner/repo
but alsoowner/repo/raw/ten/levels/more
, and then it's no longer the web page created by Github. Admitted, my example was not clear, so let me give another one you probably would not want to skip:github.com/owner/repo/raw/some/blob/dir/changelog.md
. Edge cases of course, but those could exist. Hence my suggestion to improve the RegEx.blob
withraw
would lead to the acceptable URL. If you already do that in another place, I of course withdraw this suggestion 😉974a3b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I overlooked the impact of
.+
(🤪. I will make the necessary modifications for this.Thanks for the suggestion.
974a3b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! And gladly 😃