aboutsummaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-11-23 18:08:22 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2019-11-23 18:08:22 +0200
commit2577d4054e344d2e6dc08d2cf95e83478c05bee6 (patch)
treeb9a84523250a2e12bb970176ea3f52b5b62c77e6 /ext/bg
parentcc8221c6ea686521261e2ac562d3d5a6d0b9913a (diff)
fix scanning parser
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/api.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js
index 228447c3..766fb0ed 100644
--- a/ext/bg/js/api.js
+++ b/ext/bg/js/api.js
@@ -86,7 +86,12 @@ async function apiTextParse(text, optionsContext) {
const results = [];
while (text.length > 0) {
const term = [];
- const [definitions, sourceLength] = await translator.findTerms(text, {}, options);
+ const [definitions, sourceLength] = await translator.findTermsInternal(
+ text.slice(0, options.scanning.length),
+ dictEnabledSet(options),
+ options.scanning.alphanumeric,
+ {}
+ );
if (definitions.length > 0) {
dictTermsSort(definitions);
const {expression, reading} = definitions[0];