Update CustomQuoter.plugin.js
This commit is contained in:
parent
1f5566fe99
commit
9552395386
|
@ -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");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue