From cc1c6afc72ab8a2e3acf820b4589560da5b7235e Mon Sep 17 00:00:00 2001 From: Nils Date: Mon, 13 May 2019 22:59:44 +0200 Subject: [PATCH] Fix leading white-space resulting in no results This should in theory make !search ignore leading white spaces that cause no results to be found since it is taken into the equation. I might have missed a spot but i am pretty sure this is the only place where we work with the search query --- src/plugins/Utility.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/Utility.ts b/src/plugins/Utility.ts index 607ec4f2..c7fc110f 100644 --- a/src/plugins/Utility.ts +++ b/src/plugins/Utility.ts @@ -287,7 +287,7 @@ export class UtilityPlugin extends ZeppelinPlugin { } if (args.query) { - const query = args["case-sensitive"] ? args.query : args.query.toLowerCase(); + const query = args["case-sensitive"] ? args.query.trimStart() : args.query.toLowerCase().trimStart(); matchingMembers = matchingMembers.filter(member => { const nick = args["case-sensitive"] ? member.nick : member.nick && member.nick.toLowerCase();