autocomplete: replace calls to PostQueryBuilder with PostQuery.

This commit is contained in:
evazion
2022-03-30 01:50:58 -05:00
parent 6edff247f2
commit 04551b8154
3 changed files with 24 additions and 16 deletions

View File

@@ -242,6 +242,11 @@ class PostQuery
nodes.select(&:metatag?).uniq.sort
end
# @return [Array<AST>] A list of all unique wildcard nodes in the AST.
def wildcards
nodes.select(&:wildcard?).uniq.sort
end
# @return [Array<String>] The names of all unique tags in the AST.
def tag_names
tags.map(&:name)