autocomplete: fix labels for static metatags.
When completing a static metatag, such as rating: or order:, don't include the metatag name in the autocomplete menu. For example, when completing `rating:g`, show `general` in the autocomplete menu, not `rating:general`. This makes static metatags consistent with other metatags.
This commit is contained in:
@@ -270,7 +270,7 @@ class AutocompleteService
|
||||
results = values.select { |v| v.starts_with?(value.downcase) }.sort.take(limit)
|
||||
|
||||
results.map do |v|
|
||||
{ label: metatag + ":" + v, value: v }
|
||||
{ type: "static", label: v, value: v }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user