mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch 'stable'
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -112,6 +112,8 @@ Bugs fixed
|
||||
* #4108: Search word highlighting breaks SVG images
|
||||
* #3692: Unable to build HTML if writing .buildinfo failed
|
||||
* #4152: HTML writer crashes if a field list is placed on top of the document
|
||||
* #4063: Sphinx crashes when labeling directive ``.. todolist::``
|
||||
* #4134: [doc] :file:`docutils.conf` is not documented explicitly
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
@@ -9,8 +9,20 @@ The build configuration file
|
||||
:synopsis: Build configuration file.
|
||||
|
||||
The :term:`configuration directory` must contain a file named :file:`conf.py`.
|
||||
This file (containing Python code) is called the "build configuration file" and
|
||||
contains all configuration needed to customize Sphinx input and output behavior.
|
||||
This file (containing Python code) is called the "build configuration file"
|
||||
and contains (almost) all configuration needed to customize Sphinx input
|
||||
and output behavior.
|
||||
|
||||
An optional file `docutils.conf`_ can be added to the configuration
|
||||
directory to adjust `Docutils`_ configuration if not otherwise overriden or
|
||||
set by Sphinx; this applies in particular to the `Docutils smart_quotes
|
||||
setting`_ (Note that Sphinx applies smart quotes transform by default.)
|
||||
|
||||
.. _`docutils`: http://docutils.sourceforge.net/
|
||||
|
||||
.. _`docutils.conf`: http://docutils.sourceforge.net/docs/user/config.html
|
||||
|
||||
.. _`Docutils smart_quotes setting`: http://docutils.sourceforge.net/docs/user/config.html#smart-quotes
|
||||
|
||||
The configuration file is executed as Python code at build time (using
|
||||
:func:`execfile`, and with the current directory set to its containing
|
||||
@@ -766,6 +778,18 @@ that use Sphinx's HTMLWriter class.
|
||||
The empty string is equivalent to ``'%b %d, %Y'`` (or a
|
||||
locale-dependent equivalent).
|
||||
|
||||
.. confval:: html_use_smartypants
|
||||
|
||||
If true, `SmartyPants <https://daringfireball.net/projects/smartypants/>`_
|
||||
will be used to convert quotes and dashes to typographically correct
|
||||
entities. Default: ``True``.
|
||||
|
||||
.. deprecated:: 1.6
|
||||
To disable or customize smart quotes, use the Docutils configuration file
|
||||
(``docutils.conf``) instead to set there its `smart_quotes option`_.
|
||||
|
||||
.. _`smart_quotes option`: http://docutils.sourceforge.net/docs/user/config.html#smart-quotes
|
||||
|
||||
.. confval:: html_add_permalinks
|
||||
|
||||
Sphinx will add "permalinks" for each heading and description environment as
|
||||
|
||||
@@ -137,11 +137,14 @@ def process_todo_nodes(app, doctree, fromdocname):
|
||||
env.todo_all_todos = [] # type: ignore
|
||||
|
||||
for node in doctree.traverse(todolist):
|
||||
if not app.config['todo_include_todos']:
|
||||
node.replace_self([])
|
||||
continue
|
||||
if node.get('ids'):
|
||||
content = [nodes.target()]
|
||||
else:
|
||||
content = []
|
||||
|
||||
content = []
|
||||
if not app.config['todo_include_todos']:
|
||||
node.replace_self(content)
|
||||
continue
|
||||
|
||||
for todo_info in env.todo_all_todos: # type: ignore
|
||||
para = nodes.paragraph(classes=['todo-source'])
|
||||
|
||||
Reference in New Issue
Block a user