codePreviews: fix commit links from gitea

This commit is contained in:
Cynthia Foxwell 2023-12-07 11:05:30 -07:00
parent cf736d79da
commit 84529b86af

View file

@ -7,7 +7,7 @@ const REGEX_GITHUB =
const REGEX_GITLAB =
/(?:\s|^)(\|\|\s*)?https?:\/\/.+?\/[a-z0-9-]+\/[a-z0-9-]+\/-\/blob\/([a-z0-9-_.#/%]*)(\s*\|\|)?/gi;
const REGEX_GITEA =
/(?:\s|^)(\|\|\s*)?https?:\/\/.+?\/[a-z0-9-]+\/[a-z0-9-]+\/src\/branch\/([a-z0-9-_.#/%]*)(\s*\|\|)?/gi;
/(?:\s|^)(\|\|\s*)?https?:\/\/.+?\/[a-z0-9-]+\/[a-z0-9-]+\/src\/(branch|commit)\/([a-z0-9-_.#/%]*)(\s*\|\|)?/gi;
const REGEX_SPOILER = /(?:\s|^)\|\|([\s\S]+?)\|\|/;
function unindent(str) {