diff options
Diffstat (limited to 'ext/js/language/text-scanner.js')
-rw-r--r-- | ext/js/language/text-scanner.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/js/language/text-scanner.js b/ext/js/language/text-scanner.js index a5b35a26..826c8c5b 100644 --- a/ext/js/language/text-scanner.js +++ b/ext/js/language/text-scanner.js @@ -229,7 +229,7 @@ class TextScanner extends EventDispatcher { getTextSourceContent(textSource, length, layoutAwareScan) { const clonedTextSource = textSource.clone(); - clonedTextSource.setEndOffset(length, layoutAwareScan, false); + clonedTextSource.setEndOffset(length, false, layoutAwareScan); const includeSelector = this._includeSelector; const excludeSelector = this._excludeSelector; @@ -875,7 +875,7 @@ class TextScanner extends EventDispatcher { const {dictionaryEntries, originalTextLength} = await yomichan.api.termsFind(searchText, details, optionsContext); if (dictionaryEntries.length === 0) { return null; } - textSource.setEndOffset(originalTextLength, layoutAwareScan, false); + textSource.setEndOffset(originalTextLength, false, layoutAwareScan); const sentence = DocumentUtil.extractSentence( textSource, layoutAwareScan, @@ -902,7 +902,7 @@ class TextScanner extends EventDispatcher { const dictionaryEntries = await yomichan.api.kanjiFind(searchText, optionsContext); if (dictionaryEntries.length === 0) { return null; } - textSource.setEndOffset(1, layoutAwareScan, false); + textSource.setEndOffset(1, false, layoutAwareScan); const sentence = DocumentUtil.extractSentence( textSource, layoutAwareScan, @@ -1127,7 +1127,7 @@ class TextScanner extends EventDispatcher { (excludeSelector !== null && DocumentUtil.anyNodeMatchesSelector(nodes, excludeSelector)) ) { --length; - textSource.setEndOffset(length, layoutAwareScan, false); + textSource.setEndOffset(length, false, layoutAwareScan); } else { break; } |