Skip to content

Commit

Permalink
Update lib/administrate/search.rb
Browse files Browse the repository at this point in the history
Only check the part of the section before `:` for valid filters

Co-authored-by: Pablo Brasero <36066+pablobm@users.noreply.github.com>
  • Loading branch information
cattekin and pablobm committed Oct 6, 2022
1 parent 323dc23 commit 6467a96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/administrate/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def to_s
private

def filter?(word)
valid_filters&.any? { |filter| word.match?(/^#{filter}:.*$/) }
valid_filters&.any? { |filter| word.match?(/^#{filter}:/) }
end

def parse_query(query)
Expand Down

0 comments on commit 6467a96

Please sign in to comment.