diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index 74760ec9b..dad0607e1 100644 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -69,10 +69,12 @@ function ToggleReplyBox(id) { let text = getSelection().toString().trim() if (text) { - text = text.split('> \n> Reply')[0] - textarea.value = '> ' + text - textarea.value = textarea.value.replace(/\n/g,"\n> ").replace(/\*/g,"\\*") - if (!textarea.value.endsWith('\n')) textarea.value += '\n' + text = '> ' + text + text = text.replace(/\n/g,"\n> ").replace(/\*/g,"\\*") + text = text.replace(/\n> \n/g,"\n \n") + if (!text.endsWith('\n')) text += '\n' + text = text.split('\n> Reply')[0] + textarea.value = text } textarea.focus() }