Fix #5136: Regular tags are now case-sensitive.
* Fix `AST.tag` to downcase the tag name. * Change PostQuery::Parser to use build nodes using `AST.tag`, `AST.metatag`, `AST.wildcard`, etc methods instead of building nodes directly. This way all the normalization happens in the node constructor methods instead of in the parser.
This commit is contained in:
@@ -85,6 +85,7 @@ class PostQueryBuilderTest < ActiveSupport::TestCase
|
||||
post3 = create(:post, tag_string: "bbb ccc")
|
||||
|
||||
assert_tag_match([post2, post1], "aaa")
|
||||
assert_tag_match([post2, post1], "AAA")
|
||||
assert_tag_match([post2, post1], " aaa ")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user