Fix quoting OP, optimize. Kill two birds with in one stone.
This commit is contained in:
parent
2ed173f0a5
commit
f28964138e
@ -1680,7 +1680,7 @@
|
|||||||
text = ">>" + id + "\n";
|
text = ">>" + id + "\n";
|
||||||
selection = window.getSelection();
|
selection = window.getSelection();
|
||||||
if (s = selection.toString()) {
|
if (s = selection.toString()) {
|
||||||
selectionID = (_ref = $.x('ancestor::blockquote', selection.anchorNode)) != null ? _ref.parentNode.firstElementChild.name : void 0;
|
selectionID = (_ref = $.x('ancestor::blockquote/preceding-sibling::input', selection.anchorNode)) != null ? _ref.name : void 0;
|
||||||
if (selectionID === id) {
|
if (selectionID === id) {
|
||||||
s = s.replace(/\n/g, '\n>');
|
s = s.replace(/\n/g, '\n>');
|
||||||
text += ">" + s + "\n";
|
text += ">" + s + "\n";
|
||||||
|
|||||||
@ -1316,7 +1316,7 @@ qr =
|
|||||||
|
|
||||||
selection = window.getSelection()
|
selection = window.getSelection()
|
||||||
if s = selection.toString()
|
if s = selection.toString()
|
||||||
selectionID = $.x('ancestor::blockquote', selection.anchorNode)?.parentNode.firstElementChild.name
|
selectionID = $.x('ancestor::blockquote/preceding-sibling::input', selection.anchorNode)?.name
|
||||||
if selectionID is id
|
if selectionID is id
|
||||||
s = s.replace /\n/g, '\n>'
|
s = s.replace /\n/g, '\n>'
|
||||||
text += ">#{s}\n"
|
text += ">#{s}\n"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user