summaryrefslogtreecommitdiff
path: root/sphinx/io.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/io.py')
-rw-r--r--sphinx/io.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/sphinx/io.py b/sphinx/io.py
index 8365e22e0..6fcec2cd3 100644
--- a/sphinx/io.py
+++ b/sphinx/io.py
@@ -18,7 +18,7 @@ from sphinx.transforms import (
ApplySourceWorkaround, ExtraTranslatableNodes, CitationReferences,
DefaultSubstitutions, MoveModuleTargets, HandleCodeBlocks, SortIds,
AutoNumbering, AutoIndexUpgrader, FilterSystemMessages,
- UnreferencedFootnotesDetector
+ UnreferencedFootnotesDetector, SphinxSmartQuotes
)
from sphinx.transforms.compact_bullet_list import RefOnlyBulletListTransform
from sphinx.transforms.i18n import (
@@ -98,6 +98,16 @@ class SphinxStandaloneReader(SphinxBaseReader):
RemoveTranslatableInline, PreserveTranslatableMessages, FilterSystemMessages,
RefOnlyBulletListTransform, UnreferencedFootnotesDetector]
+ def __init__(self, app, parsers={}, *args, **kwargs):
+ SphinxBaseReader.__init__(self, app, parsers, *args, **kwargs)
+ self.smart_quotes = app.env.settings['smart_quotes']
+
+ def get_transforms(self):
+ transforms = SphinxBaseReader.get_transforms(self)
+ if self.smart_quotes:
+ transforms.append(SphinxSmartQuotes)
+ return transforms
+
class SphinxI18nReader(SphinxBaseReader):
"""