Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-05-05 16:12:52 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-07-09 17:15:56 +0300
commitfb7b0ee5718af07c8eddf49f71742f6b97f7fd65 (patch)
tree8d19c75f49410eaa096fe004b9511832f73daa94 /sphinx/io.py
parent2feb0b43b64012ac982a9d07af85002b43b59226 (diff)
Fix #7619: Duplicated node IDs are generated if node has multiple IDs
Diffstat (limited to 'sphinx/io.py')
-rw-r--r--sphinx/io.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sphinx/io.py b/sphinx/io.py
index f45d5bf5d..4a9d3a94e 100644
--- a/sphinx/io.py
+++ b/sphinx/io.py
@@ -22,6 +22,7 @@ from docutils.transforms import Transform
from docutils.transforms.references import DanglingReferences
from docutils.writers import UnfilteredWriter
+from sphinx import addnodes
from sphinx.deprecation import RemovedInSphinx40Warning, deprecated_alias
from sphinx.environment import BuildEnvironment
from sphinx.errors import FiletypeNotFoundError
@@ -96,6 +97,7 @@ class SphinxBaseReader(standalone.Reader):
for logging.
"""
document = super().new_document()
+ document.__class__ = addnodes.document # replace the class with patched version
# substitute transformer
document.transformer = SphinxTransformer(document)