Update CustomQuoter.plugin.js

This commit is contained in:
Mirco Wittrien 2020-05-23 16:01:38 +02:00
parent 1f5566fe99
commit 9552395386
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ var CustomQuoter = (_ => {
let content = message.content; let content = message.content;
let selectedText = settings.quoteOnlySelected && document.getSelection().toString().trim(); let selectedText = settings.quoteOnlySelected && document.getSelection().toString().trim();
if (selectedText && content.indexOf(selectedText) > -1) content = selectedText; if (selectedText && content.replace(/[`~_-]/g, "").indexOf(selectedText) > -1) content = selectedText;
let unquotedLines = content.split("\n").filter(line => !line.startsWith("> ")); let unquotedLines = content.split("\n").filter(line => !line.startsWith("> "));
unquotedLines = unquotedLines.slice(unquotedLines.findIndex(line => line.trim().length > 0)).join("\n"); unquotedLines = unquotedLines.slice(unquotedLines.findIndex(line => line.trim().length > 0)).join("\n");