ChangeScreen2: Fix ((gitweb)) link title

Wrap the text in only one group of parens not two.  The existing
legacy code for old ChangeScreen already adds parens.

Change-Id: I380b6d246067f6533074536a984e5729789ceaae
This commit is contained in:
Shawn Pearce 2014-03-27 17:59:49 -07:00
parent 0993c837b3
commit bc31c47ced

@ -114,10 +114,9 @@ class CommitBox extends Composite {
} }
JsArray<WebLinkInfo> links = revInfo.web_links(); JsArray<WebLinkInfo> links = revInfo.web_links();
if (links != null) { if (links != null) {
for (WebLinkInfo link : Natives.asList(links)) { for (WebLinkInfo link : Natives.asList(links)) {
addWebLink(link.link_url(), link.link_name()); addWebLink(link.link_url(), parenthesize(link.link_name()));
} }
} }
} }
@ -125,7 +124,7 @@ class CommitBox extends Composite {
private void addWebLink(String href, String name) { private void addWebLink(String href, String name) {
Anchor a = new Anchor(); Anchor a = new Anchor();
a.setHref(href); a.setHref(href);
a.setText(parenthesize(name)); a.setText(name);
Element el = a.getElement(); Element el = a.getElement();
webLinkCell.appendChild(el); webLinkCell.appendChild(el);
} }