use const
This commit is contained in:
parent
8d9a635d5c
commit
b336ab3a9a
@ -86,9 +86,9 @@ async function apiTextParse(text, optionsContext) {
|
|||||||
const results = [];
|
const results = [];
|
||||||
while (text) {
|
while (text) {
|
||||||
const term = [];
|
const term = [];
|
||||||
let [definitions, sourceLength] = await translator.findTerms(text, {}, options);
|
const [definitions, sourceLength] = await translator.findTerms(text, {}, options);
|
||||||
if (definitions.length > 0) {
|
if (definitions.length > 0) {
|
||||||
definitions = dictTermsSort(definitions);
|
dictTermsSort(definitions);
|
||||||
const {expression, reading} = definitions[0];
|
const {expression, reading} = definitions[0];
|
||||||
const source = text.slice(0, sourceLength);
|
const source = text.slice(0, sourceLength);
|
||||||
for (const {text, furigana} of jpDistributeFuriganaInflected(expression, reading, source)) {
|
for (const {text, furigana} of jpDistributeFuriganaInflected(expression, reading, source)) {
|
||||||
|
@ -113,9 +113,9 @@ class QueryParser {
|
|||||||
|
|
||||||
this.queryParser.innerHTML = contents.join('<hr>');
|
this.queryParser.innerHTML = contents.join('<hr>');
|
||||||
|
|
||||||
this.queryParser.querySelectorAll('.query-parser-char').forEach((charElement) => {
|
for (const charElement of this.queryParser.querySelectorAll('.query-parser-char')) {
|
||||||
this.activateScanning(charElement);
|
this.activateScanning(charElement);
|
||||||
});
|
}
|
||||||
|
|
||||||
this.search.setSpinnerVisible(false);
|
this.search.setSpinnerVisible(false);
|
||||||
}
|
}
|
||||||
@ -133,9 +133,9 @@ class QueryParser {
|
|||||||
preview: true
|
preview: true
|
||||||
});
|
});
|
||||||
|
|
||||||
this.queryParser.querySelectorAll('.query-parser-char').forEach((charElement) => {
|
for (const charElement of this.queryParser.querySelectorAll('.query-parser-char')) {
|
||||||
this.activateScanning(charElement);
|
this.activateScanning(charElement);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
activateScanning(element) {
|
activateScanning(element) {
|
||||||
|
Loading…
Reference in New Issue
Block a user