Skip to content

Commit

Permalink
fix: The plaintext rendering color on the completion document is too
Browse files Browse the repository at this point in the history
dark.

Fixes #368

Signed-off-by: azerr <[email protected]>
  • Loading branch information
angelozerr committed Jun 19, 2024
1 parent 83ab37a commit c1ec7c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ private void render(ContentNode node, String language, NodeRendererContext conte
// Case 2: Try to highlight code block with TextMate
if (!(HAS_TEXTMATE_SUPPORT && TextMateHighlighterHelper.highlightWithTextMate(code, language , this.fileName, html))) {
// Case 3 : no highlight
html.withAttr().tag("code");
html.text(node.getContentChars());
html.tag("/code");
}
}
html.tag("/pre").closePre();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ public void linksConversion() {
""";
String html = """
<p>Here's some java code:</p>
<pre><code> @Test
<pre> @Test
public void linksConversion() {
String markdown = &quot;Here is a link [example](https://example.com)&quot;;
String html = &quot;&lt;p&gt;Here is a link &lt;a href=\\&quot;https://example.com\\&quot;&gt;example&lt;/a&gt;&lt;/p&gt;\\n&quot;;
assertEquals(html, convert(markdown));
}
</code></pre>
</pre>
""";
assertEquals(html, toHtml(markdown));

Expand All @@ -152,14 +152,14 @@ public void linksConversion() {
""";
html = """
<p>Here's some XML code:</p>
<pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;note&gt;
&lt;to&gt;Angelo&lt;/to&gt;
&lt;from&gt;Fred&lt;/from&gt;
&lt;heading&gt;Tests&lt;/heading&gt;
&lt;body&gt;I wrote them!&lt;/body&gt;
&lt;/note&gt;
</code></pre>
</pre>
""";
assertEquals(html, toHtml(markdown));
}
Expand Down

0 comments on commit c1ec7c4

Please sign in to comment.