docs: set smartquotes_action="qe" so '--' doesn't render as an en dash

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 #493

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
This commit is contained in:
Charlie Tonneslan 2026-05-16 09:18:18 -04:00
commit 01b37d1bbb

View file

@ -109,6 +109,14 @@ highlight_language = "none"
# 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 ----------------------------------------------