diff options
author | Laurent Mihalkovic <laurent.mihalkovic@gmail.com> | 2016-02-01 12:22:20 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-02-25 10:53:03 +0100 |
commit | d4c6dff219bdf98411f1cb9422aa2c1bfd83abb2 (patch) | |
tree | 9cc740ce6e426d7767f9fd129fe32dc66708340b /sonar-markdown/src | |
parent | 271d642877c769f52f7aa5fe792ee541e19cd68a (diff) | |
download | sonarqube-d4c6dff219bdf98411f1cb9422aa2c1bfd83abb2.tar.gz sonarqube-d4c6dff219bdf98411f1cb9422aa2c1bfd83abb2.zip |
SONAR-7010 Markdown engine generates wrong html tag for bold text
Diffstat (limited to 'sonar-markdown/src')
-rw-r--r-- | sonar-markdown/src/main/java/org/sonar/markdown/HtmlEmphasisChannel.java | 4 | ||||
-rw-r--r-- | sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlEmphasisChannel.java b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlEmphasisChannel.java index d400800b9cd..6990608a496 100644 --- a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlEmphasisChannel.java +++ b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlEmphasisChannel.java @@ -34,8 +34,8 @@ class HtmlEmphasisChannel extends RegexChannel<MarkdownOutput> { @Override protected void consume(CharSequence token, MarkdownOutput output) { - output.append("<em>"); + output.append("<strong>"); output.append(token.subSequence(1, token.length() - 1)); - output.append("</em>"); + output.append("</strong>"); } } diff --git a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java index 8a538d08ed9..314e924c0a0 100644 --- a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java +++ b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java @@ -101,14 +101,14 @@ public class MarkdownTest { @Test public void shouldEmphaseText() { - assertThat(Markdown.convertToHtml("This is *important*")).isEqualTo("This is <em>important</em>"); + assertThat(Markdown.convertToHtml("This is *important*")).isEqualTo("This is <strong>important</strong>"); assertThat(Markdown.convertToHtml("This should not be * \n emphase")).isEqualTo("This should not be * <br/> emphase"); - assertThat(Markdown.convertToHtml("This is *very* very *important*")).isEqualTo("This is <em>very</em> very <em>important</em>"); + assertThat(Markdown.convertToHtml("This is *very* very *important*")).isEqualTo("This is <strong>very</strong> very <strong>important</strong>"); assertThat(Markdown.convertToHtml("Not * emphase * because of whitespaces")).isEqualTo("Not * emphase * because of whitespaces"); assertThat(Markdown.convertToHtml("Not *emphase * because of whitespace")).isEqualTo("Not *emphase * because of whitespace"); assertThat(Markdown.convertToHtml("Not * emphase* because of whitespace")).isEqualTo("Not * emphase* because of whitespace"); - assertThat(Markdown.convertToHtml("emphase*inside*word")).isEqualTo("emphase<em>inside</em>word"); - assertThat(Markdown.convertToHtml("*Emphase many words*")).isEqualTo("<em>Emphase many words</em>"); + assertThat(Markdown.convertToHtml("emphase*inside*word")).isEqualTo("emphase<strong>inside</strong>word"); + assertThat(Markdown.convertToHtml("*Emphase many words*")).isEqualTo("<strong>Emphase many words</strong>"); } @Test |