PostQuery::AST: fix #to_infix to not add unnecessary parentheses.
* Fix the `#to_infix` method to not add unnecessary parentheses around subexpressions. * Fix metatags to add quotes around values when necessary.
This commit is contained in:
@@ -33,6 +33,8 @@ require "strscan"
|
||||
|
||||
class PostQuery
|
||||
class Parser
|
||||
extend Memoist
|
||||
|
||||
class Error < StandardError; end
|
||||
|
||||
METATAG_NAME_REGEX = /(#{PostQueryBuilder::METATAGS.join("|")}):/i
|
||||
@@ -265,5 +267,7 @@ class PostQuery
|
||||
AST.new(type, args)
|
||||
end
|
||||
end
|
||||
|
||||
memoize :parse, :parse!
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user