docs: set smartquotes_action="qe" so '--' doesn't render as an en dash#735
Open
c-tonneslan wants to merge 1 commit into
Open
docs: set smartquotes_action="qe" so '--' doesn't render as an en dash#735c-tonneslan wants to merge 1 commit into
c-tonneslan wants to merge 1 commit into
Conversation
The docs already escape '--' as '\\--' inside cross-references like
:ref:`insert \--convert <cli_insert_convert>`
but the Sphinx smart-quotes filter still rewrites the two dashes to an
en dash (–) in the rendered HTML, so the page ends up reading 'insert
–convert' / 'query –functions' instead of the actual flag names.
The smart-quotes default action is "qDe" (quotes + dashes + ellipses).
Drop the "D" so we only get smart quotes for actual quotes and
ellipses, and dashes pass through unchanged. The existing '\--'
escapes are now redundant but harmless, so leaving them to keep the
diff small.
Closes simonw#493
Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #493.
The docs already escape
--as\--inside cross-references like:but Sphinx's smart-quotes filter still rewrites the two dashes to an en dash in the rendered HTML, so the page reads "insert –convert" / "query –functions" instead of the actual flag names.
The smartquotes default action is
qDe(quotes + dashes + ellipses). Dropped theDso we only get smart quotes for actual quotes and ellipses; dashes pass through. Quotes elsewhere in the docs (e.g. "row" wrapping examples) still get curly-quoted as before.Tested locally with
sphinx-build -b html docs docs/_build/html. The line atcli.rst:2789now renders asinsert --convertandquery --functionsinstead of with en dashes.The existing
\--escapes are now redundant but harmless, so I left them to keep this diff minimal — easy follow-up if you want to clean them up later.📚 Documentation preview 📚: https://sqlite-utils--735.org.readthedocs.build/en/735/