fix qr quote selected text
This commit is contained in:
parent
b451dc4fe5
commit
a85a91530c
@ -646,7 +646,7 @@ qrText = (link) ->
|
|||||||
|
|
||||||
selection = window.getSelection()
|
selection = window.getSelection()
|
||||||
id = x('preceding::span[@id][1]', selection.anchorNode)?.id
|
id = x('preceding::span[@id][1]', selection.anchorNode)?.id
|
||||||
text += selection.toString() if id is link.id
|
text += selection.toString() if id is link.parentNode.id
|
||||||
|
|
||||||
text
|
text
|
||||||
|
|
||||||
|
|||||||
@ -844,7 +844,7 @@
|
|||||||
text = '>>' + link.parentNode.id.match(/\d+$/)[0] + '\n';
|
text = '>>' + link.parentNode.id.match(/\d+$/)[0] + '\n';
|
||||||
selection = window.getSelection();
|
selection = window.getSelection();
|
||||||
id = (_ref = x('preceding::span[@id][1]', selection.anchorNode)) != null ? _ref.id : void 0;
|
id = (_ref = x('preceding::span[@id][1]', selection.anchorNode)) != null ? _ref.id : void 0;
|
||||||
if (id === link.id) {
|
if (id === link.parentNode.id) {
|
||||||
text += selection.toString();
|
text += selection.toString();
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user