Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/177106
Change subject: gerrit: Output space in commentlink "commit" before the link
......................................................................
gerrit: Output space in commentlink "commit" before the link
Follows-up e69e223552.
Use 'html' instead of 'link' since there are two matches. This
way we can restore the the first match outside the link (where
it belongs).
This is pretty straight forward considering commentlink.html
just defaults to comment.link in an anchor tag.
google/gerrit/GerritConfigProvider.java:
String link = cfg.getString("commentlink", name, "link");
String html = cfg.getString("commentlink", name, "html");
if (html == null || html.isEmpty()) {
html = "<a href=\"" + link + "\">$&</a>";
}
links.add(new RegexFindReplace(match, html));
Change-Id: I6a0e149592503e37cfccb4ea46b0226f7e8aff72
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/06/177106/1
diff --git a/modules/gerrit/templates/gerrit.config.erb
b/modules/gerrit/templates/gerrit.config.erb
index d5d27f8..9162e06 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -74,7 +74,7 @@
link = "#q,$1,n,z"
[commentlink "commit"]
match = (^|\\s|[:,!?\\(\\[\\{])([0-9a-f]{7,40})\\b
- link = "#q,$2,n,z"
+ html = "$1<a href=\"#q,$2,n,z\">$2</a>"
[commentlink "bugzilla"]
match = "\\b[bB][uU][gG]\\:?\\s+#?(\\d+)\\b"
link = https://bugzilla.wikimedia.org/$1
--
To view, visit https://gerrit.wikimedia.org/r/177106
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a0e149592503e37cfccb4ea46b0226f7e8aff72
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits