Copy-paste this URL in a comment a click "Preview"
https://github.com/sindresorhus/got/compare/v11.5.2...v11.6.0#diff-6be2971b2bb8dbf48d15ff680dd898b0R191
GitHub changes the URL to the following, breaking it
https://github.com/sindresorhus/got/compare/v11.5.2...v11.6.0diff-6be2971b2bb8dbf48d15ff680dd898b0R191
This is a similar GitHub bug to https://github.com/sindresorhus/refined-github/issues/2327, which was fixed by https://github.com/sindresorhus/refined-github/pull/3085 (prevent-pr-commit-link-loss), so it'd make sense to extend that feature
can I work on this issue?
@esakki-selvaraj go for it!
@yakov116 Can i get some more links so that I can check my Reg Expression!
https://github.com/sindresorhus/refined-github/compare/20.9.11...master#diff-67ba01fa3e792891b585fa43e92c78ea
Keep in mind that there's a pretty advanced regex (which avoids selecting the url twice) already set up:
And tested:
You should start from that regex: copy the regex, copy the tests (changing only the URLs) and make sure they pass.
it's working