Skip to content

Commit c1ec7c4

Browse files
committed
fix: The plaintext rendering color on the completion document is too
dark. Fixes redhat-developer#368 Signed-off-by: azerr <[email protected]>
1 parent 83ab37a commit c1ec7c4

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/main/java/com/redhat/devtools/lsp4ij/features/documentation/SyntaxColorationCodeBlockRenderer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,7 @@ private void render(ContentNode node, String language, NodeRendererContext conte
180180
// Case 2: Try to highlight code block with TextMate
181181
if (!(HAS_TEXTMATE_SUPPORT && TextMateHighlighterHelper.highlightWithTextMate(code, language , this.fileName, html))) {
182182
// Case 3 : no highlight
183-
html.withAttr().tag("code");
184183
html.text(node.getContentChars());
185-
html.tag("/code");
186184
}
187185
}
188186
html.tag("/pre").closePre();

src/test/java/com/redhat/devtools/lsp4ij/features/documentation/MarkdownConverterTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ public void linksConversion() {
127127
""";
128128
String html = """
129129
<p>Here's some java code:</p>
130-
<pre><code> @Test
130+
<pre> @Test
131131
public void linksConversion() {
132132
String markdown = &quot;Here is a link [example](https://example.com)&quot;;
133133
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;;
134134
assertEquals(html, convert(markdown));
135135
}
136-
</code></pre>
136+
</pre>
137137
""";
138138
assertEquals(html, toHtml(markdown));
139139

@@ -152,14 +152,14 @@ public void linksConversion() {
152152
""";
153153
html = """
154154
<p>Here's some XML code:</p>
155-
<pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
155+
<pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
156156
&lt;note&gt;
157157
&lt;to&gt;Angelo&lt;/to&gt;
158158
&lt;from&gt;Fred&lt;/from&gt;
159159
&lt;heading&gt;Tests&lt;/heading&gt;
160160
&lt;body&gt;I wrote them!&lt;/body&gt;
161161
&lt;/note&gt;
162-
</code></pre>
162+
</pre>
163163
""";
164164
assertEquals(html, toHtml(markdown));
165165
}

0 commit comments

Comments
 (0)