Skip to content

Commit

Permalink
docs: turn off "smart quotes" in the HTML build
Browse files Browse the repository at this point in the history
We have long disabled the "html_use_smartypants" option to prevent Sphinx
from mangling "--" sequences (among others).  Unfortunately, Sphinx changed
that option to "smartquotes" in the 1.6.6 release, and seemingly didn't see
fit to warn about the use of the obsolete option, resulting in the
aforementioned mangling returning.  Disable this behavior again and hope
that the option name stays stable for a while.

Reported-by: Zipeng Zhang <zhangzipeng0@foxmail.com>
Link: https://lore.kernel.org/lkml/tencent_CB1A298D31FD221496FF657CD7EF406E6605@qq.com
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
  • Loading branch information
Jonathan Corbet committed Apr 20, 2023
1 parent b645fc6 commit eaae757
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,10 @@ def get_cline_version():
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['sphinx-static']

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
html_use_smartypants = False
# If true, Docutils "smart quotes" will be used to convert quotes and dashes
# to typographically correct entities. This will convert "--" to "—",
# which is not always what we want, so disable it.
smartquotes = False

# Custom sidebar templates, maps document names to template names.
# Note that the RTD theme ignores this
Expand Down

0 comments on commit eaae757

Please sign in to comment.