From 44e592e382c455cbfba08e2f2dfdd0a6dc602306 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sat, 25 Feb 2023 20:25:32 -0500 Subject: [PATCH] increase precedence of escape matching in match_query --- assets/js/match_query.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/match_query.js b/assets/js/match_query.js index 12c651ae..618ddcb8 100644 --- a/assets/js/match_query.js +++ b/assets/js/match_query.js @@ -15,8 +15,8 @@ const tokenList = [ ['not_op', /^\s*NOT(?:\s+|(?=\())/], ['not_op', /^\s*[!-]\s*/], ['space', /^\s+/], - ['word', /^(?:[^\s,()^~]|\\[\s,()^~])+/], - ['word', /^(?:[^\s,()]|\\[\s,()])+/] + ['word', /^(?:\\[\s,()^~]|[^\s,()^~])+/], + ['word', /^(?:\\[\s,()]|[^\s,()])+/] ], numberFields = ['id', 'width', 'height', 'aspect_ratio', 'comment_count', 'score', 'upvotes', 'downvotes',