From 04058a3be3cbe0520117a9770291a3bf192acb52 Mon Sep 17 00:00:00 2001 From: remi Date: Sat, 11 Jun 2022 01:41:14 +0200 Subject: [PATCH] close #13, more or less --- main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 122c676..217f8c4 100644 --- a/main.js +++ b/main.js @@ -238,7 +238,6 @@ function search(word) { for (let w in d) { if (d[w].startsWith(word)) { t = true; - console.log(searchDictionary[key][value] + " " + d[w]); } } if (t) { @@ -246,6 +245,14 @@ function search(word) { break; } } + } else if (words.length > 1 && stripWord(searchDictionary[key][value]).includes(word)) { + result.push(key); + break; + //can still produce false positives, but... very low chance + //i'll fix it once it starts happening... + //(just... re-creating the search tems to actually have spaces should do the trick, right?) + //(yeah, i'll wanna . strip spaces to not be more than one in a row and all that but. H) + //idk. this should be fine for now, and possibly, ever } } }