[gnome-builder/gnome-builder-3-36] html-preview: fix generation of markdown preview



commit e2b83ee0e4ade13e86a342af39907bc4e7d4d0a3
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jun 29 11:28:44 2020 -0700

    html-preview: fix generation of markdown preview

 src/plugins/html-preview/html_preview.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/plugins/html-preview/html_preview.py b/src/plugins/html-preview/html_preview.py
index 4568f79f4..4f072d59b 100644
--- a/src/plugins/html-preview/html_preview.py
+++ b/src/plugins/html-preview/html_preview.py
@@ -435,7 +435,7 @@ class HtmlPreviewPage(Ide.Page):
 
     def get_markdown(self, text):
         params = (HtmlPreviewData.MARKDOWN_CSS.get_data().decode('UTF-8'),
-                  html.escape(text),
+                  html.escape(text).replace('\n', '\\n'),
                   HtmlPreviewData.MARKED_JS.get_data().decode('UTF-8'),
                   HtmlPreviewData.MARKDOWN_VIEW_JS.get_data().decode('UTF-8'))
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]