Skip to content

Commit

Permalink
sphinx-doc#9413 Declare py namespace on document root to generate val…
Browse files Browse the repository at this point in the history
…id xml
  • Loading branch information
Arjun Nemani committed Jul 7, 2021
1 parent b09acab commit f1fbb98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sphinx/builders/xml.py
Expand Up @@ -71,6 +71,7 @@ def write_doc(self, docname: str, doctree: Node) -> None:
# work around multiple string % tuple issues in docutils;
# replace tuples in attribute values with lists
doctree = doctree.deepcopy()
doctree.document.attributes["xmlns:py"] = "https://github.com/sphinx-doc/sphinx/issues/9413"
for node in doctree.traverse(nodes.Element):
for att, value in node.attributes.items():
if isinstance(value, tuple):
Expand Down

0 comments on commit f1fbb98

Please sign in to comment.