Skip to content

Commit 7130b1d

Browse files
atugushevcjerdonek
authored andcommitted
Fix option name for smart quotes in sphinxdoc conf (#6422)
Also configure the smartquotes_action to exclude dashes from transformation. See https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-smartquotes
1 parent 1ef8857 commit 7130b1d

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

docs/html/conf.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,21 @@
173173
# using the given strftime format.
174174
html_last_updated_fmt = '%b %d, %Y'
175175

176-
# If true, SmartyPants will be used to convert quotes and dashes to
177-
# typographically correct entities.
178-
smart_quotes = False
176+
# If true, the Docutils Smart Quotes transform (originally based on
177+
# SmartyPants) will be used to convert characters like quotes and dashes
178+
# to typographically correct entities. The default is True.
179+
smartquotes = True
180+
181+
# This string, for use with Docutils 0.14 or later, customizes the
182+
# SmartQuotes transform. The default of "qDe" converts normal quote
183+
# characters ('"' and "'"), en and em dashes ("--" and "---"), and
184+
# ellipses "...".
185+
# For now, we disable the conversion of dashes so that long options
186+
# like "--find-links" won't render as "-find-links" if included in the
187+
# text in places where monospaced type can't be used. For example, backticks
188+
# can't be used inside roles like :ref:`--no-index <--no-index>` because
189+
# of nesting.
190+
smartquotes_action = "qe"
179191

180192
# Custom sidebar templates, maps document names to template names.
181193
html_sidebars = {

news/6422.doc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Make dashes render correctly when displaying long options like
2+
``--find-links`` in the text.

0 commit comments

Comments
 (0)