From 7f1a23a8bcf49e4e0fee43dda9a369d4922afb5b Mon Sep 17 00:00:00 2001 From: dblythy Date: Fri, 20 Nov 2020 05:19:09 +1100 Subject: [PATCH] Remove trailing new line from copy text (#794) --- _layouts/default.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_layouts/default.html b/_layouts/default.html index 50004ab92..37822f2ae 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -27,7 +27,7 @@ const text = copyText.textContent || copyText.innerText; const input = document.createElement('textarea'); - input.innerHTML = text; + input.innerHTML = text.replace(/\n$/, ''); document.body.appendChild(input); input.select(); input.setSelectionRange(0, 99999);