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:
@@ -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>");
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user