From 01b37d1bbb1a08e8b0095ce7082162dcacd34438 Mon Sep 17 00:00:00 2001 From: Charlie Tonneslan Date: Sat, 16 May 2026 09:18:18 -0400 Subject: [PATCH] docs: set smartquotes_action="qe" so '--' doesn't render as an en dash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The docs already escape '--' as '\\--' inside cross-references like :ref:`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 #493 Signed-off-by: Charlie Tonneslan --- docs/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 04a23014..6991317f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -109,6 +109,14 @@ def linkcode_resolve(domain, info): # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False +# Smart-quote substitutions, but skip the dash transformations. Without this, +# "--" inside cross-references like :ref:`insert --convert <...>` gets rewritten +# to en/em dashes (the en dash "–"), which is the bug from +# https://github.com/simonw/sqlite-utils/issues/493. The default action is +# "qDe"; dropping the "D" keeps SmartQuotes for quotes ("q") and ellipses +# ("e") while leaving "--" alone. +smartquotes_action = "qe" + # -- Options for HTML output ----------------------------------------------