We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 989c8c8 commit 2da59a8Copy full SHA for 2da59a8
htmlpreview.js
@@ -83,6 +83,7 @@
83
};
84
85
const RE_GITLAB_PATH = /^\/[^/]+\/.+\/(-\/)?(blob|raw)\/[^/]+/;
86
+ const RE_SOURCEHUT_PATH = /^\/~[^/]+\/[^/]+\/(tree|blob)\/[^/]+/;
87
88
/**
89
* Extracts the forge software and host,
@@ -124,7 +125,7 @@
124
125
software = FORGE_SOFTWARES.ForgeJo;
126
host = FORGE_HOSTS.CodeBerg_org;
127
} else if (url.host == 'git.sr.ht'
- && (/^\/~[^/]+\/[^/]+\/(tree|blob)\/[^/]+/).test(url.pathname)) {
128
+ && RE_SOURCEHUT_PATH.test(url.pathname)) {
129
software = FORGE_SOFTWARES.SourceHut;
130
host = FORGE_HOSTS.Git_Sr_Ht;
131
}
0 commit comments