From c482175050c57e1e7ac1b0d1e85ec1b6ea15eb60 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 19 Feb 2018 23:55:56 -0600 Subject: [PATCH] Fix #3558: Autocomplete: negated metatags aren't completed. Fix Danbooru.Autocomplete.parse_query to strip prefixes off of metatags. --- app/assets/javascripts/autocomplete.js.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/autocomplete.js.erb b/app/assets/javascripts/autocomplete.js.erb index f3b88c03d..5177f8248 100644 --- a/app/assets/javascripts/autocomplete.js.erb +++ b/app/assets/javascripts/autocomplete.js.erb @@ -251,7 +251,9 @@ if (match = term.match(Danbooru.Autocomplete.PREFIXES)) { metatag = match[1].toLowerCase(); term = match[2]; - } else if (match = term.match(Danbooru.Autocomplete.METATAGS)) { + } + + if (match = term.match(Danbooru.Autocomplete.METATAGS)) { metatag = match[1].toLowerCase(); term = match[2]; }