diff --git a/src/main/java/com/redhat/devtools/lsp4ij/features/documentation/SyntaxColorationCodeBlockRenderer.java b/src/main/java/com/redhat/devtools/lsp4ij/features/documentation/SyntaxColorationCodeBlockRenderer.java index 1f7e23221..d80a3ad89 100644 --- a/src/main/java/com/redhat/devtools/lsp4ij/features/documentation/SyntaxColorationCodeBlockRenderer.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/features/documentation/SyntaxColorationCodeBlockRenderer.java @@ -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(); diff --git a/src/test/java/com/redhat/devtools/lsp4ij/features/documentation/MarkdownConverterTest.java b/src/test/java/com/redhat/devtools/lsp4ij/features/documentation/MarkdownConverterTest.java index 26cde97f2..aea9f5e55 100644 --- a/src/test/java/com/redhat/devtools/lsp4ij/features/documentation/MarkdownConverterTest.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/features/documentation/MarkdownConverterTest.java @@ -127,13 +127,13 @@ public void linksConversion() { """; String html = """

Here's some java code:

-
    @Test
+                
    @Test
                     public void linksConversion() {
                         String markdown = "Here is a link [example](https://example.com)";
                         String html = "<p>Here is a link <a href=\\"https://example.com\\">example</a></p>\\n";
                         assertEquals(html, convert(markdown));
                     }
-                
+
"""; assertEquals(html, toHtml(markdown)); @@ -152,14 +152,14 @@ public void linksConversion() { """; html = """

Here's some XML code:

-
<?xml version="1.0" encoding="UTF-8"?>
+                
<?xml version="1.0" encoding="UTF-8"?>
                 <note>
                   <to>Angelo</to>
                   <from>Fred</from>
                   <heading>Tests</heading>
                   <body>I wrote them!</body>
                 </note>
-                
+
"""; assertEquals(html, toHtml(markdown)); }