diff --git a/src/lua/parser_search.lua b/src/lua/parser_search.lua index 86ed68b..2f950ad 100644 --- a/src/lua/parser_search.lua +++ b/src/lua/parser_search.lua @@ -41,7 +41,7 @@ local fields local grammar = P{ "chunk"; whitespace = S" \t\n"^0, - itm = C(P(1-S"+-")^0), --go until the next '+' or '-' + itm = C((P(1 - (P" " * S"+-")))^0), --go until the next '+' or '-' likefield = C(P"title" + P"author") * V"whitespace" * C(P"=") * V"whitespace" * V"itm", rangeop = P"<=" + P">=" + P">" + P"<" + P"=", rangefield = C(P"date" + P"hits") * V"whitespace" * C(V"rangeop") * V"whitespace" * C(V"itm"), @@ -54,7 +54,7 @@ local grammar = P{ table.insert(fields.tags,{pn,"=",field}) end end, - chunk = V"field"^0 + chunk = V"field" * (P" " * V"field")^0 } --Grammar