summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2018-09-21 21:37:15 -0700
committerGeorge Fraser <george@fivetran.com>2018-09-21 21:37:15 -0700
commitedcf41b499f0476be88a0f5914478a21a4d48c03 (patch)
treeb0444d264a5c6a70b4166cbe26d88e2c03059bd9 /src
parentc662ef7106ac64fef0498f42d4a4d2fcf9fdf391 (diff)
downloadjava-language-server-edcf41b499f0476be88a0f5914478a21a4d48c03.zip
Format <code>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/javacs/TipFormatter.java1
-rw-r--r--src/test/java/org/javacs/TipFormatterTest.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/javacs/TipFormatter.java b/src/main/java/org/javacs/TipFormatter.java
index 723987b..642ec23 100644
--- a/src/main/java/org/javacs/TipFormatter.java
+++ b/src/main/java/org/javacs/TipFormatter.java
@@ -60,6 +60,7 @@ class TipFormatter {
replaceNodes(doc, "i", contents -> String.format("*%s*", contents));
replaceNodes(doc, "b", contents -> String.format("**%s**", contents));
replaceNodes(doc, "pre", contents -> String.format("`%s`", contents));
+ replaceNodes(doc, "code", contents -> String.format("`%s`", contents));
return print(doc);
}
diff --git a/src/test/java/org/javacs/TipFormatterTest.java b/src/test/java/org/javacs/TipFormatterTest.java
index 2358013..3f2af1e 100644
--- a/src/test/java/org/javacs/TipFormatterTest.java
+++ b/src/test/java/org/javacs/TipFormatterTest.java
@@ -12,5 +12,6 @@ public class TipFormatterTest {
assertThat(asMarkdown("<i>foo</i>"), equalTo("*foo*"));
assertThat(asMarkdown("<b>foo</b>"), equalTo("**foo**"));
assertThat(asMarkdown("<pre>foo</pre>"), equalTo("`foo`"));
+ assertThat(asMarkdown("<code>foo</code>"), equalTo("`foo`"));
}
}