1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 04:40:09 +01:00

Add trailing / in url match

This commit is contained in:
Mike Linksvayer 2024-07-13 22:32:01 -07:00 committed by GitHub
parent a51201d12b
commit 3f5208ac0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,7 +48,7 @@ describe 'license meta' do
if example_url.start_with?('https://github.com/') if example_url.start_with?('https://github.com/')
example_url.gsub!(%r{\Ahttps://github.com/([\w-]+/[\w.-]+)/blob/(\S+)\z}, 'https://raw.githubusercontent.com/\1/\2') example_url.gsub!(%r{\Ahttps://github.com/([\w-]+/[\w.-]+)/blob/(\S+)\z}, 'https://raw.githubusercontent.com/\1/\2')
elsif example_url.start_with?('https://git.savannah.gnu.org/', 'https://git.gnome.org/', 'https://code.qt.io') elsif example_url.start_with?('https://git.savannah.gnu.org/', 'https://git.gnome.org/', 'https://code.qt.io/')
example_url.gsub!(%r{/tree/}, '/plain/') example_url.gsub!(%r{/tree/}, '/plain/')
elsif example_url.start_with?('https://bitbucket.org/') elsif example_url.start_with?('https://bitbucket.org/')
example_url.gsub!(%r{/src/}, '/raw/') example_url.gsub!(%r{/src/}, '/raw/')