diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-05-05 00:13:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 00:13:43 +0300 |
commit | 7d7ff165ced305bc269b24aa0ce8664272d86fa6 (patch) | |
tree | acfba82a6b71770263dae23ce2f1ecb2a617f256 /ext/bg/js/search-query-parser.js | |
parent | 77b744e675f8abf17ff5e8433f4f1717e0c9ffb5 (diff) |
Extract textSource text inside TextScanner (#500)
* extract text inside TextScanner
* clone textSource before text extraction
Diffstat (limited to 'ext/bg/js/search-query-parser.js')
-rw-r--r-- | ext/bg/js/search-query-parser.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/bg/js/search-query-parser.js b/ext/bg/js/search-query-parser.js index 137234e8..935f01f2 100644 --- a/ext/bg/js/search-query-parser.js +++ b/ext/bg/js/search-query-parser.js @@ -51,8 +51,7 @@ class QueryParser extends TextScanner { async onSearchSource(textSource, cause) { if (textSource === null) { return null; } - this.setTextSourceScanLength(textSource, this.options.scanning.length); - const searchText = textSource.text(); + const searchText = this.getTextSourceContent(textSource, this.options.scanning.length); if (searchText.length === 0) { return; } const {definitions, length} = await apiTermsFind(searchText, {}, this.getOptionsContext()); |