Merge pull request #3795 from mitya57/stable

Better wording for the html_use_smartypants deprecation message
This commit is contained in:
Takeshi KOMIYA 2017-05-24 23:36:45 +09:00 committed by GitHub
commit 74b50c6368

View File

@ -675,8 +675,10 @@ class BuildEnvironment(object):
language = (self.config.language or 'en').replace('_', '-') language = (self.config.language or 'en').replace('_', '-')
self.settings['language_code'] = language self.settings['language_code'] = language
if self.config.html_use_smartypants is not None: if self.config.html_use_smartypants is not None:
warnings.warn("html_use_smartypants option is deprecated. Use the " warnings.warn("html_use_smartypants option is deprecated. Smart "
"smart_quotes option in docutils.conf instead.", "quotes are on by default; if you want to disable "
"or customize them, use the smart_quotes option in "
"docutils.conf.",
RemovedInSphinx17Warning) RemovedInSphinx17Warning)
if language in smartchars.quotes: if language in smartchars.quotes:
self.settings['smart_quotes'] = self.config.html_use_smartypants self.settings['smart_quotes'] = self.config.html_use_smartypants