Because the newlines are not commented out, this leaves an empty token
at the beginning of the block. This empty token manifests as a spurious
empty line in certain contexts, for example when using the line block
inside a definition list.
This closes#11529.
* The directive option ``:noindex:`` was renamed to ``:no-index:``.
* The directive option ``:noindexentry:`` was renamed to ``:no-index-entry:``.
* The directive option ``:nocontentsentry:`` was renamed to ``:no-contents-entry:``.
The previous names are retained as aliases, but will be deprecated
and removed in a future version of Sphinx (9.0 or later).
For documentation that includes *many* doctests,
seeing both successes and failures can add a lot of noise to the command output.
This change adds a ``doctest_show_success`` option that,
when set to ``False``, will only show doctest failures.
When ``toc_object_entries_show_parents = 'domain'`` in the config,
the TOC entries omit the namespaces added by the ``cpp:namespace`` and ``cpp:namespace-push`` directives.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
The ``locale_dir`` keyword argument for the ``init_console()`` method
defaults to the path that method is implemented in (via ``__file__``),
and then that (non-deterministic) default argument is included in Sphinx's own documentation.
This makes the build unreproducible as it varies
depending on the directory you create the documentation from.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
The current implementation of ``sphinx.ext.coverage`` outputs which
methods,classes, and functions are documented.
This commit adds a short summary of this report in terms of
``documented objects / total number of objects``,
both per module and total.
The purpose of this is to support
a currently not mainstream but relevant use-case:
a coverage report on the number of objects that are documented.
By having the statistics on the report or on the stdout,
a regex expression can capture the coverage percentage
(e.g. ``re.search(r'TOTAL.*?([0-9.]{4,6}\%)', d).group(1)``)
and use it e.g. in another report, a status badge, etc.
Two options were added to the configuration to allow a table
to be printed in the report and/or to stdout.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
``util.inspect.object_description`` already attempts to sort collections, but this can fail.
This commit handles the failure case by using string-based object descriptions
as a fallback deterministic sort ordering, and protects against recursive collections.
Co-authored-by: Chris Lamb <lamby@debian.org>
Co-authored-by: Faidon Liambotis <paravoid@debian.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>