From b278522e356b8b527e680dad3558ea076c264222 Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Thu, 12 Sep 2019 12:31:25 -0700 Subject: [PATCH] commento.js: preserve whitespace in edits --- frontend/js/commento.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/js/commento.js b/frontend/js/commento.js index 5b08b9f..a80a597 100644 --- a/frontend/js/commento.js +++ b/frontend/js/commento.js @@ -1194,7 +1194,7 @@ text.replaceWith(textareaCreate(id, true)); var textarea = $(ID_TEXTAREA + id); - textarea.innerText = commentsMap[id].markdown; + textarea.innerText = commentsMap[id].markdown.replace(" ", " ").replace("\n", "
"); var editButton = $(ID_EDIT + id);