From 6c06ce596118776478bb118f256d354ece3b1af3 Mon Sep 17 00:00:00 2001 From: adxsoft Date: Tue, 5 Dec 2023 23:17:01 +1100 Subject: [PATCH] Update index.js Further fix for startswith and endswith --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index fa5770c..8c05ba8 100644 --- a/index.js +++ b/index.js @@ -2084,12 +2084,12 @@ function processCommandLines(action, command, commandlines) { if (command === "blocks") { if (arg[0] !== "*" && arg[arg.length - 1] === "*") { - addQueryLines(command, prefix, "arg_blockcontent_startswith", arg.substring(1)); + addQueryLines(command, prefix, "arg_blockcontent_startswith", arg.substring(0, arg.length - 1)); continue; } if (arg[0] === "*" && arg[arg.length - 1] !== "*") { - addQueryLines(command, prefix, "arg_blockcontent_endswith", arg.substring(0, arg.length - 1)); + addQueryLines(command, prefix, "arg_blockcontent_endswith", arg.substring(1)); continue; }