Give findKanji the same API as findTerms
This commit is contained in:
parent
af1662acad
commit
58c0997999
@ -83,7 +83,7 @@ async function apiTermsFind(text, optionsContext) {
|
||||
|
||||
async function apiKanjiFind(text, optionsContext) {
|
||||
const options = await apiOptionsGet(optionsContext);
|
||||
const definitions = await utilBackend().translator.findKanji(text, dictEnabledSet(options));
|
||||
const definitions = await utilBackend().translator.findKanji(text, options);
|
||||
return definitions.slice(0, options.general.maxResults);
|
||||
}
|
||||
|
||||
|
@ -330,7 +330,8 @@ class Translator {
|
||||
return deinflections;
|
||||
}
|
||||
|
||||
async findKanji(text, dictionaries) {
|
||||
async findKanji(text, options) {
|
||||
const dictionaries = dictEnabledSet(options);
|
||||
const titles = Object.keys(dictionaries);
|
||||
const kanjiUnique = {};
|
||||
const kanjiList = [];
|
||||
|
Loading…
Reference in New Issue
Block a user