diff --git a/src/serviceProviders/sourcehut.js b/src/serviceProviders/sourcehut.js index 1c62271..612ee85 100644 --- a/src/serviceProviders/sourcehut.js +++ b/src/serviceProviders/sourcehut.js @@ -25,7 +25,7 @@ limitations under the License. import * as E from '../enums.js' import { ServiceProvider } from '../serviceProvider.js' -export const reURI = /^https:\/\/git\.sr\.ht\/~([^~]*)\/(.*)\/?/ +export const reURI = /^https:\/\/git\.sr\.ht\/~([^~/]*)\/([^/]*)\/?$/ /** * @function @@ -88,5 +88,17 @@ export const tests = [ { uri: 'https://domain.org/alice/keyoxide_proof', shouldMatch: false + }, + { + uri: 'https://git.sr.ht/~alice/proof_repo/tree/master', + shouldMatch: false + }, + { + uri: 'https://git.sr.ht/~alice/proof_repo/blob/master/proof.md', + shouldMatch: false + }, + { + uri: 'https://git.sr.ht/~alice/proof_repo/blob/main/proof.md', + shouldMatch: false } ]