Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: turn off "smart quotes" in the HTML build

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>

+4 -3
+4 -3
Documentation/conf.py
··· 343 343 # so a file named "default.css" will overwrite the builtin "default.css". 344 344 html_static_path = ['sphinx-static'] 345 345 346 - # If true, SmartyPants will be used to convert quotes and dashes to 347 - # typographically correct entities. 348 - html_use_smartypants = False 346 + # If true, Docutils "smart quotes" will be used to convert quotes and dashes 347 + # to typographically correct entities. This will convert "--" to "—", 348 + # which is not always what we want, so disable it. 349 + smartquotes = False 349 350 350 351 # Custom sidebar templates, maps document names to template names. 351 352 # Note that the RTD theme ignores this