Open Kuuuube opened 3 months ago
I suppose this is because _disallowExpandSelection
is set to true
in TextSourceRange
? Hence the extractSentence
in TextSourceGenerator
is not functioning properly?
I think the fix involves changing this line https://github.com/themoeway/yomitan/blob/76ca08bd59f0e8bfa1bb20ac813f48e7ab241265/ext/js/dom/text-source-generator.js#L66
to not just blindly copy source
(which has _disallowExpandSelection === true
), but to find a way to set this value to false
after copying
Might be relevant: I am also getting incorrect highlights when using the cloze-prefix/cloze-body/cloze-suffix for highlighting in sentences for Anki cards. For example, when adding 快く:
Currently switched to simply having the sentence only with no highlighting
Description When using either the
Scan selected text
keybind or theLookup in Yomitan
context menu item, the following handlebars do not capture any text before the scanned text:Yomitan version 0283b29