fix scanning parser
This commit is contained in:
parent
cc8221c6ea
commit
2577d4054e
@ -86,7 +86,12 @@ async function apiTextParse(text, optionsContext) {
|
|||||||
const results = [];
|
const results = [];
|
||||||
while (text.length > 0) {
|
while (text.length > 0) {
|
||||||
const term = [];
|
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) {
|
if (definitions.length > 0) {
|
||||||
dictTermsSort(definitions);
|
dictTermsSort(definitions);
|
||||||
const {expression, reading} = definitions[0];
|
const {expression, reading} = definitions[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user