mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-11-02 20:30:30 -06:00
Fix #5648: NodeMatcher matches Text node on attribute match
This commit is contained in:
1 parent
9c2fd94204
commit
722c92250c
2 files changed
+7
No files matched your search
@@ -82,6 +82,10 @@ def test_NodeMatcher():
|
||||
matcher = NodeMatcher(nodes.title)
|
||||
assert len(doctree.traverse(matcher)) == 0
|
||||
|
||||
# search with Any does not match to Text node
|
||||
matcher = NodeMatcher(blah=Any)
|
||||
assert len(doctree.traverse(matcher)) == 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'rst,node_cls,count',
|
||||
|
||||
Reference in new issue
Block a user