diff options
author | Freddy Mallet <freddy.mallet@gmail.com> | 2011-04-27 21:40:15 +0200 |
---|---|---|
committer | Freddy Mallet <freddy.mallet@gmail.com> | 2011-04-27 21:40:15 +0200 |
commit | 66ca2094ad12aa9fda34f60157bf6835d846a835 (patch) | |
tree | 4ad8cbe5a4fdf59d6b2ccf4c07e4bb0f9067223f /sonar-markdown/src | |
parent | 25f963bfb953346ee85337009b1af7d665494aa0 (diff) | |
download | sonarqube-66ca2094ad12aa9fda34f60157bf6835d846a835.tar.gz sonarqube-66ca2094ad12aa9fda34f60157bf6835d846a835.zip |
SONAR-2384 use backtick instead of simple quote in the HtmlCodeChannel
Diffstat (limited to 'sonar-markdown/src')
-rw-r--r-- | sonar-markdown/src/main/java/org/sonar/markdown/HtmlCodeChannel.java | 6 | ||||
-rw-r--r-- | sonar-markdown/src/test/java/org/sonar/markdown/MarkdownEngineTest.java | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlCodeChannel.java b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlCodeChannel.java index ed2591a0197..82215a62a85 100644 --- a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlCodeChannel.java +++ b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlCodeChannel.java @@ -22,14 +22,14 @@ package org.sonar.markdown; import org.sonar.channel.RegexChannel; /** - * Markdown treats double simple quotes ('') as indicators of code. Text wrapped with two '' will be wrapped with an HTML {@literal <code>} tag. + * Markdown treats double backtick quote (``) as indicators of code. Text wrapped with two `` will be wrapped with an HTML {@literal <code>} tag. * - * E.g., the input ''printf()'' will produce {@literal<code>}printf(){@literal</code>} + * E.g., the input ``printf()`` will produce {@literal<code>}printf(){@literal</code>} */ class HtmlCodeChannel extends RegexChannel<MarkdownOutput> { public HtmlCodeChannel() { - super("''.+?''"); + super("``.+?``"); } @Override 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 cf4a0f1b726..123c64c9360 100644 --- a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownEngineTest.java +++ b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownEngineTest.java @@ -44,8 +44,8 @@ public class MarkdownEngineTest { @Test public void shouldDecorateCode() { - assertThat(MarkdownEngine.convertToHtml("This is a ''line of code''"), is("This is a <code>line of code</code>")); - assertThat(MarkdownEngine.convertToHtml("This is not a ''line of code"), is("This is not a ''line of code")); + assertThat(MarkdownEngine.convertToHtml("This is a ``line of code``"), is("This is a <code>line of code</code>")); + assertThat(MarkdownEngine.convertToHtml("This is not a ``line of code"), is("This is not a ``line of code")); } @Test |