From 86e7f282e06542119a0ebc99062a3c6453719bae Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Sat, 15 Sep 2018 20:13:33 +0200 Subject: [PATCH] Make the function search to look for the prefix --- _includes/bin_table.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/bin_table.html b/_includes/bin_table.html index b727e34..c4a684f 100644 --- a/_includes/bin_table.html +++ b/_includes/bin_table.html @@ -61,7 +61,7 @@ // check against the pattern var noMatches = true; functionElems.forEach((item) => { - if (item.innerText.toLowerCase().indexOf(pattern) !== -1) { + if (item.innerText.toLowerCase().startsWith(pattern.toLowerCase())) { item.className = 'match'; noMatches = false; }