From 84529b86af086bc8f5dcbc0731678e6a898d0702 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Thu, 7 Dec 2023 11:05:30 -0700 Subject: [PATCH] codePreviews: fix commit links from gitea --- src/modules/codePreviews.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/codePreviews.js b/src/modules/codePreviews.js index 9edf4f1..8cd1cfa 100644 --- a/src/modules/codePreviews.js +++ b/src/modules/codePreviews.js @@ -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) {