Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d05b1a commit 3a7ff99Copy full SHA for 3a7ff99
1 file changed
Doc/tools/sgmlconv/docfixer.py
@@ -131,10 +131,21 @@ def cleanup_root_text(doc):
131
)
132
133
def fixup_descriptors(doc):
134
- for tagName in DESCRIPTOR_ELEMENTS:
135
- nodes = find_all_elements(doc, tagName)
136
- for node in nodes:
137
- rewrite_descriptor(doc, node)
+ sections = find_all_elements(doc, "section")
+ for section in sections:
+ find_and_fix_descriptors(doc, section)
+
138
139
+def find_and_fix_descriptors(doc, container):
140
+ children = container.childNodes
141
+ for child in children:
142
+ if child.nodeType == xml.dom.core.ELEMENT:
143
+ tagName = child.tagName
144
+ if tagName in DESCRIPTOR_ELEMENTS:
145
+ rewrite_descriptor(doc, child)
146
+ elif tagName == "subsection":
147
+ find_and_fix_descriptors(doc, child)
148
149
150
def rewrite_descriptor(doc, descriptor):
151
#
0 commit comments