diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-04-23 08:23:52 +0200 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-04-23 08:23:52 +0200 |
commit | 327a952a2f36f3a4eef2d76c3671a1737e550ce5 (patch) | |
tree | c29f42e629e2604c5bc1aa8fbb6186796aedc77f /sonar-markdown/src/main/java/org/sonar | |
parent | af9f6dfcd3732b97cc7b441c88778f9a765709ba (diff) | |
download | sonarqube-327a952a2f36f3a4eef2d76c3671a1737e550ce5.tar.gz sonarqube-327a952a2f36f3a4eef2d76c3671a1737e550ce5.zip |
SONAR-2384 Complete the support of emphasis
Diffstat (limited to 'sonar-markdown/src/main/java/org/sonar')
-rw-r--r-- | sonar-markdown/src/main/java/org/sonar/markdown/HtmlEmphasisChannel.java | 6 |
1 files changed, 4 insertions, 2 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 146797ed7e4..48d42b1114b 100644 --- a/sonar-markdown/src/main/java/org/sonar/markdown/HtmlEmphasisChannel.java +++ b/sonar-markdown/src/main/java/org/sonar/markdown/HtmlEmphasisChannel.java @@ -24,11 +24,13 @@ import org.sonar.channel.RegexChannel; class HtmlEmphasisChannel extends RegexChannel<MarkdownOutput> { public HtmlEmphasisChannel() { - super("\\*[^\n\r]*\\*"); + super("\\*\\S[^\n\r\\*\\s]*\\*"); } @Override protected void consume(CharSequence token, MarkdownOutput output) { - output.append("<em>" + token.subSequence(1, token.length() - 1) + "</em>"); + output.append("<em>"); + output.append(token.subSequence(1, token.length() - 1)); + output.append("</em>"); } } |