summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-22 15:34:49 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-01-24 20:15:25 -0500
commitfb6e56b3b75d49415e24f9c3d5489ce1482863b1 (patch)
tree9e33fb35a9bb0940c95b6d47cdc106d4188b4621 /ext
parent73cc64fb5c055a95c0c26a1cb173269cdeac8659 (diff)
Remove redundant alphanumeric parameter from findTermsInternal
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/translator.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js
index 88a5c6e8..d9cb0c54 100644
--- a/ext/bg/js/translator.js
+++ b/ext/bg/js/translator.js
@@ -151,7 +151,7 @@ class Translator {
async findTermsGrouped(text, details, options) {
const dictionaries = dictEnabledSet(options);
const titles = Object.keys(dictionaries);
- const [definitions, length] = await this.findTermsInternal(text, dictionaries, options.scanning.alphanumeric, details, options);
+ const [definitions, length] = await this.findTermsInternal(text, dictionaries, details, options);
const definitionsGrouped = dictTermsGroup(definitions, dictionaries);
await this.buildTermFrequencies(definitionsGrouped, titles);
@@ -169,7 +169,7 @@ class Translator {
const dictionaries = dictEnabledSet(options);
const secondarySearchTitles = Object.keys(options.dictionaries).filter((dict) => options.dictionaries[dict].allowSecondarySearches);
const titles = Object.keys(dictionaries);
- const [definitions, length] = await this.findTermsInternal(text, dictionaries, options.scanning.alphanumeric, details, options);
+ const [definitions, length] = await this.findTermsInternal(text, dictionaries, details, options);
const {sequencedDefinitions, defaultDefinitions} = await this.getSequencedDefinitions(definitions, options.general.mainDictionary);
const definitionsMerged = [];
const mergedByTermIndices = new Set();
@@ -206,15 +206,15 @@ class Translator {
async findTermsSplit(text, details, options) {
const dictionaries = dictEnabledSet(options);
const titles = Object.keys(dictionaries);
- const [definitions, length] = await this.findTermsInternal(text, dictionaries, options.scanning.alphanumeric, details, options);
+ const [definitions, length] = await this.findTermsInternal(text, dictionaries, details, options);
await this.buildTermFrequencies(definitions, titles);
return [definitions, length];
}
- async findTermsInternal(text, dictionaries, alphanumeric, details, options) {
- if (!alphanumeric && text.length > 0) {
+ async findTermsInternal(text, dictionaries, details, options) {
+ if (!options.scanning.alphanumeric && text.length > 0) {
const c = text[0];
if (!jpIsKana(c) && !jpIsKanji(c)) {
return [[], 0];