diff --git a/CHANGES b/CHANGES index a5796204765..6ef683b8e7a 100644 --- a/CHANGES +++ b/CHANGES @@ -23,6 +23,8 @@ Bugs fixed decorated by functools.lru_cache * #9879: autodoc: AttributeError is raised on building document for an object having invalid __doc__ atribute +* #9872: html: Class namespace collision between autodoc signatures and + docutils-0.17 * #9864: mathjax: Failed to render equations via MathJax v2. The loading method of MathJax is back to "async" method again diff --git a/sphinx/writers/html5.py b/sphinx/writers/html5.py index 15fd1544921..bba07f4478e 100644 --- a/sphinx/writers/html5.py +++ b/sphinx/writers/html5.py @@ -13,7 +13,7 @@ import re import urllib.parse import warnings -from typing import TYPE_CHECKING, Iterable, Tuple, cast +from typing import TYPE_CHECKING, Iterable, Set, Tuple, cast from docutils import nodes from docutils.nodes import Element, Node, Text @@ -56,6 +56,10 @@ class HTML5Translator(SphinxTranslator, BaseTranslator): """ builder: "StandaloneHTMLBuilder" = None + # Override docutils.writers.html5_polyglot:HTMLTranslator + # otherwise, nodes like ... will be + # converted to ... by `visit_inline`. + supported_inline_tags: Set[str] = set() def __init__(self, document: nodes.document, builder: Builder) -> None: super().__init__(document, builder)