[PATCH] docs: turn off "smart quotes" in the HTML build

From: Jonathan Corbet
Date: Thu Apr 20 2023 - 11:34:35 EST


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@xxxxxxxxxxx>
Link: https://lore.kernel.org/lkml/tencent_CB1A298D31FD221496FF657CD7EF406E=
6605@xxxxxx
Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
---
Documentation/conf.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index db16814f182f..3d1f74f76e64 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -343,9 +343,10 @@ sys.stderr.write("Using %s theme\n" % html_theme)
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path =3D ['sphinx-static']
=20
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-html_use_smartypants =3D False
+# If true, Docutils "smart quotes will be used to convert quotes and dashes
+# to typographically correct entities. This will convert "--" to "=E2=80=
=94",
+# which is not always what we want, so disable it.
+smartquotes =3D False
=20
# Custom sidebar templates, maps document names to template names.
# Note that the RTD theme ignores this
--=20
2.40.0