Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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