Commit 2664db9f authored by Fred Drake's avatar Fred Drake

handle_labels(): Fix problem for document fragments containing more

	than one "root" that prevented all the <label id=...> items
	from being promoted to id attributes on the enclosing chapter/
	section/... properly.
parent a7998f65
...@@ -165,7 +165,9 @@ def handle_appendix(doc): ...@@ -165,7 +165,9 @@ def handle_appendix(doc):
def handle_labels(doc): def handle_labels(doc):
labels = doc.getElementsByTagName("label") for node in doc.childNodes:
if node.nodeType == xml.dom.core.ELEMENT:
labels = node.getElementsByTagName("label")
for label in labels: for label in labels:
id = label.getAttribute("id") id = label.getAttribute("id")
if not id: if not id:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment