Skip to content

Commit

Permalink
Merge pull request #9873 from ebolyen/docutils-auto-convert
Browse files Browse the repository at this point in the history
BUG: prevent automatic inline conversion by class
  • Loading branch information
tk0miya committed Nov 22, 2021
2 parents 55e8a3a + ffb747f commit a6ac73b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sphinx/writers/html5.py
Expand Up @@ -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
Expand Down Expand Up @@ -56,6 +56,10 @@ class HTML5Translator(SphinxTranslator, BaseTranslator):
"""

builder: "StandaloneHTMLBuilder" = None
# Override docutils.writers.html5_polyglot:HTMLTranslator
# otherwise, nodes like <inline classes="s">...</inline> will be
# converted to <s>...</s> by `visit_inline`.
supported_inline_tags: Set[str] = set()

def __init__(self, document: nodes.document, builder: Builder) -> None:
super().__init__(document, builder)
Expand Down

0 comments on commit a6ac73b

Please sign in to comment.