diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-01-19 22:42:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-20 03:42:43 +0000 |
commit | be267e1994f8fda2ef68562c5c3a5edc9442a8a8 (patch) | |
tree | a8680e949e997e8453dd45e6c0c9e46d87d97695 /ext/js/language/translator.js | |
parent | ff5db2c18e3731e7c1063bf27ad5d6d9d22d1c6c (diff) |
Add Deinflector.rulesMatch helper function (#530)
Diffstat (limited to 'ext/js/language/translator.js')
-rw-r--r-- | ext/js/language/translator.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js index a2313263..cedc7d3d 100644 --- a/ext/js/language/translator.js +++ b/ext/js/language/translator.js @@ -410,7 +410,7 @@ export class Translator { const definitionRules = Deinflector.rulesToRuleFlags(databaseEntry.rules); for (const deinflection of uniqueDeinflectionArrays[databaseEntry.index]) { const deinflectionRules = deinflection.rules; - if (!partsOfSpeechFilter || deinflectionRules === 0 || (definitionRules & deinflectionRules) !== 0) { + if (!partsOfSpeechFilter || Deinflector.rulesMatch(deinflectionRules, definitionRules)) { deinflection.databaseEntries.push(databaseEntry); } } |