mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.13] gh-119317: findall instead of traverse for docutils nodes (GH-119319) (#119486)
gh-119317: findall instead of traverse for docutils nodes (GH-119319)
(cherry picked from commit 0867bce457
)
Co-authored-by: Carlos Meza <hire@carlosmeza.com>
This commit is contained in:
parent
d58ebf073c
commit
7322ff1561
2 changed files with 4 additions and 4 deletions
|
@ -25,8 +25,8 @@ def process_glossary_nodes(app, doctree, fromdocname):
|
|||
|
||||
terms = {}
|
||||
|
||||
for node in doctree.traverse(glossary):
|
||||
for glossary_item in node.traverse(definition_list_item):
|
||||
for node in doctree.findall(glossary):
|
||||
for glossary_item in node.findall(definition_list_item):
|
||||
term = glossary_item[0].astext().lower()
|
||||
definition = glossary_item[1]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue