[doc] html_unescape: Create html.unescape extension

This new sphinx extension runs html.unescape
(from the Python Standard Library) on source files before they are
rendered, allowing escape sequences like  ' ' for the no-break
space character.

I have also published this extension in my own name under a different
license (the same one Sphinx uses) for others to use:
https://github.com/JJRcop/sphinxcontrib-html_unescape
This commit is contained in:
Jonathan Rubenstein
2023-10-31 01:37:24 +02:00
committed by Geoffrey McRae
parent 626f5eb32e
commit f6b2cec841
2 changed files with 67 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ rst_prolog = """
extensions = [
'sphinx_rtd_theme',
'html_unescape',
]
try:
@@ -64,6 +65,14 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# Explicitly state master_doc instead of relying on default
master_doc = 'index'
# Documents to exclude from html_unescape
# For example ['index', 'credits']
html_unescape_exclude = []
# If not empty, html_unescape will ignore any documents not in the list
# For example ['install', 'usage']
html_unescape_onlyinclude = []
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for