From dcbfb64dd5b2ea3f460038a6f2f1a4c699055092 Mon Sep 17 00:00:00 2001 From: adxsoft Date: Tue, 5 Dec 2023 22:30:57 +1100 Subject: [PATCH] Update index.js Fix for issue #5 block startswith and endswith not working correctly --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1fb005c..fa5770c 100644 --- a/index.js +++ b/index.js @@ -2083,12 +2083,12 @@ function processCommandLines(action, command, commandlines) { } if (command === "blocks") { - if (arg[0] === "*" && arg[arg.length - 1] !== "*") { + if (arg[0] !== "*" && arg[arg.length - 1] === "*") { addQueryLines(command, prefix, "arg_blockcontent_startswith", arg.substring(1)); continue; } - if (arg[0] !== "*" && arg[arg.length - 1] === "*") { + if (arg[0] === "*" && arg[arg.length - 1] !== "*") { addQueryLines(command, prefix, "arg_blockcontent_endswith", arg.substring(0, arg.length - 1)); continue; }