From 240aeb84855a153764830186d5f4e7f22873561c Mon Sep 17 00:00:00 2001 From: unwox Date: Thu, 10 Oct 2024 15:03:06 +0600 Subject: implement filtering by tags --- parser/parser.fnl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'parser/parser.fnl') diff --git a/parser/parser.fnl b/parser/parser.fnl index ca74847..cb026bc 100644 --- a/parser/parser.fnl +++ b/parser/parser.fnl @@ -108,15 +108,15 @@ (fn guess-tags [text] (local text (if text (luna.utf.lower text) "")) - (if (: (anywhere (peg.P "зеленый")) :match text) + (if (: (anywhere (peg.P "зеленый чай")) :match text) ["Зеленый чай"] (: (anywhere (peg.P "улун")) :match text) ["Улун"] - (: (anywhere (peg.P "белый")) :match text) + (: (anywhere (peg.P "белый чай")) :match text) ["Белый чай"] - (: (anywhere (peg.P "желтый")) :match text) + (: (anywhere (peg.P "желтый чай")) :match text) ["Желтый чай"] - (: (anywhere (peg.P "красный")) :match text) + (: (anywhere (peg.P "красный чай")) :match text) ["Красный чай"] (: (anywhere (peg.P "хэй ча")) :match text) ["Хэй ча"] -- cgit v1.2.3