commento.js: preserve whitespace in edits

This commit is contained in:
Adhityaa Chandrasekar 2019-09-12 12:31:25 -07:00
parent 982a574512
commit b278522e35

View File

@ -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(" ", "&nbsp;").replace("\n", "<br>");
var editButton = $(ID_EDIT + id);