summaryrefslogtreecommitdiff
path: root/sphinx/util/nodes.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r--sphinx/util/nodes.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index a59606044..484681368 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -68,6 +68,9 @@ class NodeMatcher:
if self.classes and not isinstance(node, self.classes):
return False
+ if self.attrs and isinstance(node, nodes.Text):
+ return False
+
for key, value in self.attrs.items():
if key not in node:
return False