Format java files with google-java-format

google-java-format was not run after squashing string concatenations
in change I7348413ae.

Change-Id: I30afb262cca64e7638657d59ebb81938c22f0242
This commit is contained in:
David Pursehouse
2017-02-17 13:21:04 +09:00
parent 34f51034c9
commit 42ace3c4f4
16 changed files with 26 additions and 56 deletions

View File

@@ -126,8 +126,7 @@ public abstract class SafeHtml implements com.google.gwt.safehtml.shared.SafeHtm
/** Convert bare http:// and https:// URLs into <a href> tags. */
public SafeHtml linkify() {
final String part =
"(?:[a-zA-Z0-9$_+!*'%;:@=?#/~-]|&(?!lt;|gt;)|[.,](?!(?:\\s|$)))";
final String part = "(?:[a-zA-Z0-9$_+!*'%;:@=?#/~-]|&(?!lt;|gt;)|[.,](?!(?:\\s|$)))";
return replaceAll(
"(https?://" + part + "{2,}(?:[(]" + part + "*[)])*" + part + "*)",
"<a href=\"$1\" target=\"_blank\" rel=\"nofollow\">$1</a>");

View File

@@ -54,8 +54,7 @@ public class SafeHtml_ReplaceTest {
o.replaceAll(repls(new RawFindReplace("(issue\\s(\\d+))", "<a href=\"?$2\">$1</a>")));
assertThat(o).isNotSameAs(n);
assertThat(n.asString())
.isEqualTo(
"A\n<a href=\"?42\">issue 42</a>\n<a href=\"?9918\">issue 9918</a>\nB");
.isEqualTo("A\n<a href=\"?42\">issue 42</a>\n<a href=\"?9918\">issue 9918</a>\nB");
}
@Test