diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-04-14 16:03:30 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-04-15 02:35:26 +0900 |
commit | af58d7faed65bd6af6a29f6042c6d358e256ea2d (patch) | |
tree | 01b7d9b55331300f5359fdf98e08eb940a8827dc /sphinx/io.py | |
parent | 19585962a2105ae93e3d17439baaa00c288163be (diff) | |
download | sphinx-git-af58d7faed65bd6af6a29f6042c6d358e256ea2d.tar.gz |
Remove substitution_definition nodes from doctree on reading phase (refs: #4827)
Diffstat (limited to 'sphinx/io.py')
-rw-r--r-- | sphinx/io.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sphinx/io.py b/sphinx/io.py index 826da1812..fb34615ad 100644 --- a/sphinx/io.py +++ b/sphinx/io.py @@ -31,6 +31,7 @@ from sphinx.transforms.compact_bullet_list import RefOnlyBulletListTransform from sphinx.transforms.i18n import ( PreserveTranslatableMessages, Locale, RemoveTranslatableInline, ) +from sphinx.transforms.references import SubstitutionDefinitionsRemover from sphinx.util import logging from sphinx.util.docutils import LoggingReporter @@ -93,7 +94,8 @@ class SphinxStandaloneReader(SphinxBaseReader): Locale, CitationReferences, DefaultSubstitutions, MoveModuleTargets, HandleCodeBlocks, AutoNumbering, AutoIndexUpgrader, SortIds, RemoveTranslatableInline, FilterSystemMessages, RefOnlyBulletListTransform, - UnreferencedFootnotesDetector, SphinxSmartQuotes, ManpageLink + UnreferencedFootnotesDetector, SphinxSmartQuotes, ManpageLink, + SubstitutionDefinitionsRemover, ] # type: List[Transform] def __init__(self, app, *args, **kwargs): @@ -116,7 +118,8 @@ class SphinxI18nReader(SphinxBaseReader): DefaultSubstitutions, MoveModuleTargets, HandleCodeBlocks, AutoNumbering, SortIds, RemoveTranslatableInline, FilterSystemMessages, RefOnlyBulletListTransform, - UnreferencedFootnotesDetector, SphinxSmartQuotes, ManpageLink] + UnreferencedFootnotesDetector, SphinxSmartQuotes, ManpageLink, + SubstitutionDefinitionsRemover] def set_lineno_for_reporter(self, lineno): # type: (int) -> None |