diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-12-17 16:11:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 16:11:19 -0500 |
commit | 19ab9df6e4110ef7d5927c95993141a1f8960c53 (patch) | |
tree | 31849bf1e1c9622cd1aa3aeb0709ad95ffc744b1 /ext/js/background/backend.js | |
parent | 70fa701c906fa4319e0d62818fe5737e983b49ef (diff) |
Replace 'wildcard' parameter with 'matchType' (#2038)
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r-- | ext/js/background/backend.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index f8424e80..ce830361 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -1080,7 +1080,8 @@ class Backend { const jp = this._japaneseUtil; const mode = 'simple'; const options = this._getProfileOptions(optionsContext); - const findTermsOptions = this._getTranslatorFindTermsOptions(mode, {wildcard: null}, options); + const details = {matchType: 'exact'}; + const findTermsOptions = this._getTranslatorFindTermsOptions(mode, details, options); const results = []; let previousUngroupedSegment = null; let i = 0; @@ -1958,7 +1959,8 @@ class Backend { } _getTranslatorFindTermsOptions(mode, details, options) { - const {wildcard} = details; + let {matchType} = details; + if (typeof matchType !== 'string') { matchType = 'exact'; } const enabledDictionaryMap = this._getTranslatorEnabledDictionaryMap(options); const { general: {mainDictionary, sortFrequencyDictionary, sortFrequencyDictionaryOrder}, @@ -1985,7 +1987,7 @@ class Backend { excludeDictionaryDefinitions.add(mainDictionary); } return { - wildcard, + matchType, mainDictionary, sortFrequencyDictionary, sortFrequencyDictionaryOrder, |