diff options
Diffstat (limited to 'parser')
| -rw-r--r-- | parser/clubcha.fnl | 2 | ||||
| -rw-r--r-- | parser/parser.fnl | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/parser/clubcha.fnl b/parser/clubcha.fnl index 200be94..4bfe8ec 100644 --- a/parser/clubcha.fnl +++ b/parser/clubcha.fnl @@ -86,8 +86,6 @@ {:path "upakovka-dlya-puera"} {:path "upakovka-dlya-posudy"} {:path "iz-lichnoj-kollektsii"} - ;; FIXME: expand this tags [to subcategories because the main one] - ;; does not contain all the products {:path "gaivan" :tags ["Посуда"]} {:path "chashka" :tags ["Посуда"]} {:path "chaynyi-nabor" :tags ["Посуда"]} diff --git a/parser/parser.fnl b/parser/parser.fnl index cb026bc..97cc6e7 100644 --- a/parser/parser.fnl +++ b/parser/parser.fnl @@ -1,6 +1,7 @@ (import-macros {: map} :lib.macro) (local number (require :lib.number)) +(local {: must} (require :lib.utils)) (local peg (if (pick-values 1 (pcall require :lpeg)) @@ -106,7 +107,7 @@ ;; FIXME: make guessing case insensitive (fn guess-tags [text] - (local text (if text (luna.utf.lower text) "")) + (local text (if text (must (luna.utf.lower text)) "")) (if (: (anywhere (peg.P "зеленый чай")) :match text) ["Зеленый чай"] |
