post queries: parse count metatag synonyms.

This commit is contained in:
evazion
2022-04-06 16:18:15 -05:00
parent f15f365375
commit 2adc530ba0
2 changed files with 24 additions and 2 deletions

View File

@@ -162,9 +162,10 @@ class PostQuery
# metatag_name = "user" | "fav" | "pool" | "order" | ...
def metatag
if accept(METATAG_NAME_REGEX)
name = @scanner.matched.delete_suffix(":")
name = @scanner.matched.delete_suffix(":").downcase
name = name.singularize + "_count" if name.in?(PostQueryBuilder::COUNT_METATAG_SYNONYMS)
value = quoted_string
node(:metatag, name.downcase, value)
node(:metatag, name, value)
end
end