From: Freddy Mallet Date: Wed, 27 Apr 2011 21:58:01 +0000 (+0200) Subject: SONAR-2384 append target='_blank' when building an hyperlink X-Git-Tag: 2.8~100 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ffdc8908a25b4f5e071c1797d0bf7b40a9f9d8d5;p=sonarqube.git SONAR-2384 append target='_blank' when building an hyperlink --- diff --git a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlUrlChannel.java b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlUrlChannel.java index 2158c428f00..5a8522399ea 100644 --- a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlUrlChannel.java +++ b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlUrlChannel.java @@ -33,6 +33,6 @@ class HtmlUrlChannel extends RegexChannel { @Override protected void consume(CharSequence token, MarkdownOutput output) { - output.append("" + token + ""); + output.append("" + token + ""); } } diff --git a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownEngineTest.java b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownEngineTest.java index 123c64c9360..b1979254828 100644 --- a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownEngineTest.java +++ b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownEngineTest.java @@ -28,17 +28,19 @@ public class MarkdownEngineTest { @Test public void shouldDecorateUrl() { - assertThat(MarkdownEngine.convertToHtml("http://google.com"), is("http://google.com")); + assertThat(MarkdownEngine.convertToHtml("http://google.com"), + is("http://google.com")); } @Test public void shouldDecorateEndOfLine() { assertThat(MarkdownEngine.convertToHtml("1\r2\r\n3\n"), is("1
2
3
")); } - + @Test public void shouldDecorateList() { - assertThat(MarkdownEngine.convertToHtml(" * one\r* two\r\n* three\n * \n *five"), is(" *five")); + assertThat(MarkdownEngine.convertToHtml(" * one\r* two\r\n* three\n * \n *five"), + is(" *five")); assertThat(MarkdownEngine.convertToHtml(" * one\r* two"), is("")); }