From 66ca2094ad12aa9fda34f60157bf6835d846a835 Mon Sep 17 00:00:00 2001 From: Freddy Mallet Date: Wed, 27 Apr 2011 21:40:15 +0200 Subject: [PATCH] SONAR-2384 use backtick instead of simple quote in the HtmlCodeChannel --- .../src/main/java/org/sonar/markdown/HtmlCodeChannel.java | 6 +++--- .../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 } tag. + * Markdown treats double backtick quote (``) as indicators of code. Text wrapped with two `` will be wrapped with an HTML {@literal } tag. * - * E.g., the input ''printf()'' will produce {@literal}printf(){@literal} + * E.g., the input ``printf()`` will produce {@literal}printf(){@literal} */ class HtmlCodeChannel extends RegexChannel { 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 line of 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 line of code")); + assertThat(MarkdownEngine.convertToHtml("This is not a ``line of code"), is("This is not a ``line of code")); } @Test -- 2.39.5