Pass options directly to translator.findTerms*
This commit is contained in:
parent
91bc31d758
commit
aae971a09e
@ -38,7 +38,8 @@ async function apiTermsFind(text) {
|
|||||||
const {definitions, length} = await searcher(
|
const {definitions, length} = await searcher(
|
||||||
text,
|
text,
|
||||||
dictEnabledSet(options),
|
dictEnabledSet(options),
|
||||||
options.scanning.alphanumeric
|
options.scanning.alphanumeric,
|
||||||
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -36,8 +36,7 @@ class Translator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async findTermsGrouped(text, dictionaries, alphanumeric) {
|
async findTermsGrouped(text, dictionaries, alphanumeric, options) {
|
||||||
const options = await apiOptionsGet();
|
|
||||||
const titles = Object.keys(dictionaries);
|
const titles = Object.keys(dictionaries);
|
||||||
const {length, definitions} = await this.findTerms(text, dictionaries, alphanumeric);
|
const {length, definitions} = await this.findTerms(text, dictionaries, alphanumeric);
|
||||||
|
|
||||||
@ -55,8 +54,7 @@ class Translator {
|
|||||||
return {length, definitions: definitionsGrouped};
|
return {length, definitions: definitionsGrouped};
|
||||||
}
|
}
|
||||||
|
|
||||||
async findTermsMerged(text, dictionaries, alphanumeric) {
|
async findTermsMerged(text, dictionaries, alphanumeric, options) {
|
||||||
const options = await apiOptionsGet();
|
|
||||||
const secondarySearchTitles = Object.keys(options.dictionaries).filter(dict => options.dictionaries[dict].allowSecondarySearches);
|
const secondarySearchTitles = Object.keys(options.dictionaries).filter(dict => options.dictionaries[dict].allowSecondarySearches);
|
||||||
const titles = Object.keys(dictionaries);
|
const titles = Object.keys(dictionaries);
|
||||||
const {length, definitions} = await this.findTerms(text, dictionaries, alphanumeric);
|
const {length, definitions} = await this.findTerms(text, dictionaries, alphanumeric);
|
||||||
|
Loading…
Reference in New Issue
Block a user