Properly encode links to files with special characters for the user to
actually be able to download them.
The issue still remains for image files but the logic path
is quite different than with other files fix might involve changes
to docutils.
Fixessphinx-doc/sphinx#3097
Signed-off-by: Johannes Aalto <ext-johannes.aalto@vaisala.com>
Add test to make sure Sphinx uses proper URL encoding for
special characters in file names.
Use test_html_download() since it test_html5_output() doesn't
quite seem to have easy pattern to verify the contents of href
attribute.
Issue #3097
Signed-off-by: Johannes Aalto <ext-johannes.aalto@vaisala.com>
This allows to inject a reST snippet through autodoc-process-bases
event. It helps to modify the base classes of any class to the expected
mark-up'ed text by custom extension.
In case of the descendants of generic class, the value of
obj.__orig_bases__ is incorrect because it returns original base
arguments for the child of the generic class instead of the target
class itself.
This uses obj.__dict__ to get the correct __orig_bases__ information.
Autosummary generates reST code that uses raw `:obj:` xrefs to refer
the python objects in the summary table. But they're fragile because
they assume the primary_domain=='py'.
This adds `:py:` prefix to these xrefs to make them robust.
Autodoc generates reST code that uses raw `:obj:` and `:class:` xrefs to
refer the classes and types. But they're fragile because they assume
the primary_domain=='py'.
This adds `:py:` prefix to these xrefs to make them robust.
The "search.html" template will generate a warning admonition about
requiring JavaScript for search and automatically hiding the element
when supported. While functional, if a client renders the page slowly,
the warning notification may be visible to the user for a moment.
Instead of relying on JavaScript to suppress this warning, use a
`noscript` tag to hide the warning for clients who do not support
JavaScript. This also has the benefit of one less JavaScript call
required by a client.
Signed-off-by: James Knight <james.d.knight@live.com>
Also, update man page for configuration to document that
if a blank description is entered, the "NAME" section is an
empty string.
Signed-off-by: Harumi Kuno <harumi.kuno@hpe.com>
Before 3.10, an instance of NewType has incorrect module name. But it
was fixed on 3.10. This starts to use the module info if the
interpreter is 3.10+.