diff --git a/js/utils.js b/js/utils.js index f4b6335..ff34e5b 100644 --- a/js/utils.js +++ b/js/utils.js @@ -104,7 +104,11 @@ function buildSQ() { const lf = document.getElementById("lemma_forma"); const ftxt = document.getElementById("queryText"); if (ftxt.value != "") { - parsedquery.where[1].expression.args[1].value = "^" + ftxt.value + "$"; + strval=ftxt.value.trim().slice(0, -1) + if (ftxt.value.trim().slice(-1) !=='*') + strval="^" +ftxt.value.trim()+ "$"; + + parsedquery.where[1].expression.args[1].value = strval; if (lf.value == 'lemma') parsedquery.where[1].expression.args[0].value = "lm"; }