Revert "Add :confval:smart_quotes to disable smart quotes through `conf.py` (refs: #4142)"

This reverts commit bfd39c12b2.
This commit is contained in:
Takeshi KOMIYA 2017-11-01 22:35:00 +09:00
parent 26db2675b4
commit 79df05b36d
4 changed files with 7 additions and 18 deletions

View File

@ -14,8 +14,6 @@ Features added
-------------- --------------
* #4181: autodoc: Sort dictionary keys when possible * #4181: autodoc: Sort dictionary keys when possible
* Add :confval:`smart_quotes` to disable smart quotes through ``conf.py``
(refs: #3967)
Bugs fixed Bugs fixed
---------- ----------

View File

@ -23,7 +23,8 @@ and output behavior.
The configuration file is executed as Python code at build time (using The configuration file is executed as Python code at build time (using
:func:`execfile`, and with the current directory set to its containing :func:`execfile`, and with the current directory set to its containing
directory), and therefore can execute arbitrarily complex code. directory), and therefore can execute arbitrarily complex code. Sphinx then
reads simple names from the file's namespace as its configuration.
Important points to note: Important points to note:
@ -341,14 +342,6 @@ General configuration
.. versionadded:: 1.3 .. versionadded:: 1.3
.. confval:: smart_quotes
If true, `SmartyPants <https://daringfireball.net/projects/smartypants/>`_
will be used to convert quotes and dashes to typographically correct
entities. Default: ``True``.
.. versionadded:: 1.6.6
.. confval:: tls_verify .. confval:: tls_verify
If true, Sphinx verifies server certifications. Default is ``True``. If true, Sphinx verifies server certifications. Default is ``True``.
@ -785,9 +778,8 @@ that use Sphinx's HTMLWriter class.
entities. Default: ``True``. entities. Default: ``True``.
.. deprecated:: 1.6 .. deprecated:: 1.6
To disable smart quotes, use :confval:`smart_quotes` or the Docutils To disable or customize smart quotes, use the Docutils configuration file
configuration file (``docutils.conf``) instead to set there its (``docutils.conf``) instead to set there its `smart_quotes option`_.
`smart_quotes option`_.
.. _`smart_quotes option`: http://docutils.sourceforge.net/docs/user/config.html#smart-quotes .. _`smart_quotes option`: http://docutils.sourceforge.net/docs/user/config.html#smart-quotes

View File

@ -132,7 +132,6 @@ class Config(object):
tls_verify = (True, 'env'), tls_verify = (True, 'env'),
tls_cacerts = (None, 'env'), tls_cacerts = (None, 'env'),
smart_quotes = (True, 'env'),
) # type: Dict[unicode, Tuple] ) # type: Dict[unicode, Tuple]
def __init__(self, dirname, filename, overrides, tags): def __init__(self, dirname, filename, overrides, tags):

View File

@ -677,14 +677,14 @@ class BuildEnvironment(object):
language = self.config.language or 'en' language = self.config.language or 'en'
self.settings['language_code'] = language self.settings['language_code'] = language
if 'smart_quotes' not in self.settings: if 'smart_quotes' not in self.settings:
self.settings['smart_quotes'] = True
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. Smart " warnings.warn("html_use_smartypants option is deprecated. Smart "
"quotes are on by default; if you want to disable " "quotes are on by default; if you want to disable "
"them, use the smart_quotes option", "or customize them, use the smart_quotes option in "
"docutils.conf.",
RemovedInSphinx17Warning) RemovedInSphinx17Warning)
self.settings['smart_quotes'] = self.config.html_use_smartypants self.settings['smart_quotes'] = self.config.html_use_smartypants
else:
self.settings['smart_quotes'] = self.config.smart_quotes
# confirm selected language supports smart_quotes or not # confirm selected language supports smart_quotes or not
for tag in normalize_language_tag(language): for tag in normalize_language_tag(language):