[gnome-builder] html-preview: fix generation of markdown preview
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] html-preview: fix generation of markdown preview
- Date: Mon, 29 Jun 2020 18:29:14 +0000 (UTC)
commit 2d6d50862679b9673bca7916aaf0317fec0697be
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]