From b0d2117bfd7aa05c945ffeec47e4ab5349e1f07d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 3 Oct 2019 16:45:29 +0200 Subject: [PATCH] LibMarkdown: Avoid emitting
 tags for now, to help
 LibHTML

LibHTML can't handle block children of inline elements just yet.
---
 Libraries/LibMarkdown/MDCodeBlock.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Libraries/LibMarkdown/MDCodeBlock.cpp b/Libraries/LibMarkdown/MDCodeBlock.cpp
index 230324ccf9..61d518e177 100644
--- a/Libraries/LibMarkdown/MDCodeBlock.cpp
+++ b/Libraries/LibMarkdown/MDCodeBlock.cpp
@@ -27,12 +27,10 @@ String MDCodeBlock::render_to_html() const
     if (style.emph)
         builder.append("");
 
-    builder.append("
");
-
     if (style_language.is_null())
-        builder.append("");
+        builder.append("");
     else
-        builder.appendf("", style_language.characters());
+        builder.appendf("", style_language.characters());
 
     // TODO: This should also be done in other places.
     for (int i = 0; i < m_code.length(); i++)
@@ -45,7 +43,7 @@ String MDCodeBlock::render_to_html() const
         else
             builder.append(m_code[i]);
 
-    builder.append("
"); + builder.append(""); if (style.emph) builder.append("
");