Skip to content

Commit cb1812b

Browse files
authored
Use Node.findall over Node.traverse (#10)
1 parent 7ecbc2c commit cb1812b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: sphinxcontrib/devhelp/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def write_toc(node: nodes.Node, parent: etree.Element) -> None:
9393
parent.attrib['name'] = node.astext()
9494

9595
matcher = NodeMatcher(addnodes.compact_paragraph, toctree=Any)
96-
for node in tocdoc.traverse(matcher): # type: addnodes.compact_paragraph
96+
for node in tocdoc.findall(matcher): # type: addnodes.compact_paragraph
9797
write_toc(node, chapters)
9898

9999
# Index

0 commit comments

Comments
 (0)