From cfa9da17a728ea0e2b8799c2cf6df7caca018b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sun, 1 Jan 2017 21:20:48 -0500 Subject: [PATCH] Rely on fuzzy's case insensitivity, do not trim mode --- client/js/lounge.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/js/lounge.js b/client/js/lounge.js index 4090b898..5fd07abe 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -1068,7 +1068,7 @@ $(function() { }); chat.on("input", ".search", function() { - const value = $(this).val().toLowerCase(); + const value = $(this).val(); const names = $(this).closest(".users").find(".names"); names.find(".user").each((i, el) => { @@ -1078,7 +1078,7 @@ $(function() { const fuzzyOptions = { pre: "", post: "", - extract: el => $(el).text().toLowerCase().replace(/[+%@~]/, "") + extract: el => $(el).text() }; fuzzy.filter( @@ -1086,8 +1086,7 @@ $(function() { names.find(".user").toArray(), fuzzyOptions ).forEach(el => { - const firstChar = $(el.original).text()[0].replace(/[^+%@~]/, ""); - $(el.original).html(firstChar + el.string).show(); + $(el.original).html(el.string).show(); }); });