summaryrefslogtreecommitdiff
path: root/sphinx/transforms/references.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/transforms/references.py')
-rw-r--r--sphinx/transforms/references.py17
1 files changed, 2 insertions, 15 deletions
diff --git a/sphinx/transforms/references.py b/sphinx/transforms/references.py
index e74d9657d..cd564d9eb 100644
--- a/sphinx/transforms/references.py
+++ b/sphinx/transforms/references.py
@@ -4,14 +4,13 @@
Docutils transforms used by Sphinx.
- :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from typing import Any, Dict
-from docutils import nodes
-from docutils.transforms.references import DanglingReferences, Substitutions
+from docutils.transforms.references import DanglingReferences
from sphinx.transforms import SphinxTransform
@@ -20,17 +19,6 @@ if False:
from sphinx.application import Sphinx
-class SubstitutionDefinitionsRemover(SphinxTransform):
- """Remove ``substitution_definition node from doctrees."""
-
- # should be invoked after Substitutions process
- default_priority = Substitutions.default_priority + 1
-
- def apply(self, **kwargs: Any) -> None:
- for node in self.document.traverse(nodes.substitution_definition):
- node.parent.remove(node)
-
-
class SphinxDanglingReferences(DanglingReferences):
"""DanglingReferences transform which does not output info messages."""
@@ -56,7 +44,6 @@ class SphinxDomains(SphinxTransform):
def setup(app: "Sphinx") -> Dict[str, Any]:
- app.add_transform(SubstitutionDefinitionsRemover)
app.add_transform(SphinxDanglingReferences)
app.add_transform(SphinxDomains)