Support compare diff URLs in `prevent-pr-commit-link-loss`
See original GitHub issueCopy-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
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
DiffNow - Compare Files, URLs, and Clipboard Contents Online
Upload files, provide URLs, and paste clipboard contents to compare content online. Powered by ExamDiff Pro, the most powerful desktop file comparison tool....
Read more >Looking for a file-diff tool which allows URL's as input [closed]
Another great online tool is Mergely. It supports files as well as URLs. It has a very nice UI and you can save...
Read more >Comparing / Diff a Production URL and a Development URL
I'm wondering if I'm missing something obvious: what I'm trying to do is do a comparison / diff between two different URLs -...
Read more >DiffNow - Compare Files, URLs, and Clipboard Contents ...
DiffNow is a free online tool for comparing text, URLs, and files, powered by ExamDiff Pro. DiffNow offers a subset of ExamDiff Pro's...
Read more >Recursively compare two directories with diff -r without ...
Unfortunately, older versions of diff don't support ignoring symlinks: ... Currently, diff treats symbolic links like regular files; it treats other special ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Keep in mind that there’s a pretty advanced regex (which avoids selecting the url twice) already set up:
https://github.com/sindresorhus/refined-github/blob/6d339762d762b669bb48b2977f40a83c48305a2d/source/github-helpers/index.ts#L98-L99
And tested:
https://github.com/sindresorhus/refined-github/blob/86529e79015ea54b2eda9f06a1aca692acf7baea/test/helpers.ts#L176-L211
You should start from that regex: copy the regex, copy the tests (changing only the URLs) and make sure they pass.
@esakki-selvaraj go for it!