From 28fb362147358819afeb0f0a5fa7a4ad136499ac Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 13 Jul 2023 16:39:01 +0200 Subject: ignore terms --- search/search.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'search') diff --git a/search/search.ts b/search/search.ts index 57bd0e2..89c8289 100644 --- a/search/search.ts +++ b/search/search.ts @@ -36,6 +36,7 @@ export default class Search { // ignore ignored by user terms if (result.sort < 0) return false; + // deconjugated words if (result.depth > 0) { // check if this word can be conjugated at all @@ -47,7 +48,7 @@ export default class Search { if (result.tags.includes(Tag.Class.Verb.Ru) && !result.tags.includes(Tag.Inflection.Reason.Ru)) return false; if (result.tags.includes(Tag.Class.Verb.Suru) && - !result.tags.includes(Tag.Inflection.Reason.Suru)) return false; + !result.tags.anyOf([ Tag.Inflection.Reason.Suru, Tag.Class.Verb.SuruIncluded ])) return false; if (result.tags.includes(Tag.Class.Adjective.I) && !result.tags.includes(Tag.Inflection.Reason.Adjective.I)) return false; if (result.tags.includes(Tag.Class.Adjective.Na) && -- cgit v1.2.3