diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-11-02 16:25:10 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-11-02 16:25:10 +0300 |
commit | 449a567732dbb484c51cb2e591418d9f4f2ed8df (patch) | |
tree | 520cf19a1d3b5a8915721aa343d4735a0fd83e4d /sphinx/transforms | |
parent | 7eabbfc5ecdf52329672410f651880645074e215 (diff) | |
parent | 487b8436c6e8dc596db4b8d4d06e9145105a2ac2 (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/transforms')
-rw-r--r-- | sphinx/transforms/references.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/sphinx/transforms/references.py b/sphinx/transforms/references.py index d25c8cbac..372d06470 100644 --- a/sphinx/transforms/references.py +++ b/sphinx/transforms/references.py @@ -11,8 +11,7 @@ from typing import Any, Dict from typing import TYPE_CHECKING -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 TYPE_CHECKING: 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) |