summaryrefslogtreecommitdiff
path: root/lisp/progmodes/bug-reference.el
diff options
context:
space:
mode:
authorMiha Rihtaršič <miha@kamnitnik.top>2021-10-26 10:54:54 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-10-27 15:41:32 +0200
commit3fac3120f8ba7941bac89fa90f30140492fdf0eb (patch)
tree27639c898ed6f39e4dfa657e3075824974fc4dcd /lisp/progmodes/bug-reference.el
parent65cd2d90b7a894c184f45bfff52b7c6200ebc639 (diff)
downloademacs-3fac3120f8ba7941bac89fa90f30140492fdf0eb.tar.gz
emacs-3fac3120f8ba7941bac89fa90f30140492fdf0eb.tar.bz2
emacs-3fac3120f8ba7941bac89fa90f30140492fdf0eb.zip
Allow matching non-.git gitlab and gitea URLs in bug-reference
* lisp/progmodes/bug-reference.el (bug-reference--build-forge-setup-entry): Allow matching non-.git gitlab and gitea URLs, with and without slashes (bug#51316).
Diffstat (limited to 'lisp/progmodes/bug-reference.el')
-rw-r--r--lisp/progmodes/bug-reference.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 993d670917b..d7092a37d44 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -287,7 +287,7 @@ via the internet it might also be http.")
(cl-defmethod bug-reference--build-forge-setup-entry
(host-domain (_forge-type (eql 'gitlab)) protocol)
`(,(concat "[/@]" (regexp-quote host-domain)
- "[/:]\\([.A-Za-z0-9_/-]+\\)\\.git")
+ "[/:]\\([.A-Za-z0-9_/-]+?\\)\\(?:\\.git\\)?/?\\'")
"\\(\\([.A-Za-z0-9_/-]+\\)?\\([#!]\\)\\([0-9]+\\)\\)\\>"
,(lambda (groups)
(let ((ns-project (nth 1 groups)))
@@ -304,7 +304,7 @@ via the internet it might also be http.")
(cl-defmethod bug-reference--build-forge-setup-entry
(host-domain (_forge-type (eql 'gitea)) protocol)
`(,(concat "[/@]" (regexp-quote host-domain)
- "[/:]\\([.A-Za-z0-9_/-]+\\)\\.git")
+ "[/:]\\([.A-Za-z0-9_/-]+?\\)\\(?:\\.git\\)?/?\\'")
"\\(\\([.A-Za-z0-9_/-]+\\)?\\(?:#\\)\\([0-9]+\\)\\)\\>"
,(lambda (groups)
(let ((ns-project (nth 1 groups)))