Skip to content
Snippets Groups Projects
Commit 1426edfc authored by Martin Mareš's avatar Martin Mareš
Browse files

Edit: "Reply" button appends to the current comment instead of replacing it

parent 37c1ced9
Branches
No related tags found
No related merge requests found
......@@ -41,7 +41,9 @@ exports.render_md = function () {
b.innerHTML = result;
const reply = b.parentElement.getElementsByClassName("preply")[0];
reply.onclick = function() {
cmt.value = src.replaceAll(/^/gm, "> ");
if (cmt.value != "" && !cmt.value.endsWith("\n"))
cmt.value += "\n";
cmt.value += src.replaceAll(/^/gm, "> ");
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment