mirror of
https://github.com/badlogic/heissepreise.git
synced 2024-06-19 15:05:50 +02:00
Allow & in tokens, so M&M can be matched, somewhat.
This commit is contained in:
parent
a8abd39239
commit
cdf5e83ea9
|
@ -126,7 +126,7 @@ exports.queryItemsAlasql = (query, items) => {
|
|||
exports.queryItems = (query, items, exactWord) => {
|
||||
query = query.trim().replace(",", ".").toLowerCase();
|
||||
if (query.length < 3) return { items: [], queryTokens: [] };
|
||||
const regex = /([\p{L}-][\p{L}\p{N}-]*)|(>=|<=|=|>|<)|(\d+(\.\d+)?)/gu;
|
||||
const regex = /([\p{L}&-][\p{L}\p{N}&-]*)|(>=|<=|=|>|<)|(\d+(\.\d+)?)/gu;
|
||||
let tokens = query.match(regex);
|
||||
|
||||
// Find quantity/unit query
|
||||
|
|
Loading…
Reference in New Issue
Block a user