Skip to content

Commit

Permalink
Fix option name for smart quotes in sphinxdoc conf (#6422)
Browse files Browse the repository at this point in the history
Also configure the smartquotes_action to exclude dashes from transformation.
See https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-smartquotes
  • Loading branch information
atugushev authored and cjerdonek committed Apr 21, 2019
1 parent 1ef8857 commit 7130b1d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 15 additions & 3 deletions docs/html/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,21 @@
# using the given strftime format.
html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
smart_quotes = False
# If true, the Docutils Smart Quotes transform (originally based on
# SmartyPants) will be used to convert characters like quotes and dashes
# to typographically correct entities. The default is True.
smartquotes = True

# This string, for use with Docutils 0.14 or later, customizes the
# SmartQuotes transform. The default of "qDe" converts normal quote
# characters ('"' and "'"), en and em dashes ("--" and "---"), and
# ellipses "...".
# For now, we disable the conversion of dashes so that long options
# like "--find-links" won't render as "-find-links" if included in the
# text in places where monospaced type can't be used. For example, backticks
# can't be used inside roles like :ref:`--no-index <--no-index>` because
# of nesting.
smartquotes_action = "qe"

# Custom sidebar templates, maps document names to template names.
html_sidebars = {
Expand Down
2 changes: 2 additions & 0 deletions news/6422.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Make dashes render correctly when displaying long options like
``--find-links`` in the text.

0 comments on commit 7130b1d

Please sign in to comment.