Open simonw opened 2 years ago
I tried the tips in https://stackoverflow.com/questions/15258831/how-to-handle-two-dashes-in-rest (not the settings change though, because I might want smart quotes elsewhere) and they didn't work.
Maybe I should disable smart quotes entirely?
I feel like there should be an escaping trick that works here though. I tried insert -\\-convert
but it didn't help.
this is likely what you are looking for: https://stackoverflow.com/a/51076749/697964
but yeah I would say just disable smart quotes
Based on the docs here I tried the following too: https://docutils.sourceforge.io/docs/user/smartquotes.html#description
\--
\\--
\\-\\-
\-\-
But none of them had the desired effect in this particular piece of markup:
the :ref:`insert \--convert <cli_insert_convert>`
I think because this is text inside a :ref:
block, not regular text.
Consider the following:
The \--convert and the :ref:`insert \--convert <cli_insert_convert>` and
It's rendered like this:
Disabling smart quotes entirely is probably the way. If you really want m-dashes or n-dashes you can just put them in the text. And the sort of people who use this library are likely to be normal, mentally stable individuals who would be more than happy to do wihout LaTeX-level typography if it means they can copy command options from documentation into their shell and not be confused for the next few minutes of their life.
Added in:
483
I don't know how to fix this in Sphinx: I'm getting this: https://sqlite-utils.datasette.io/en/latest/cli.html#cli-install
But I want it to display
insert --convert
and notinsert –convert
there.Here's the code: https://github.com/simonw/sqlite-utils/blob/85247038f70d7eb2f3e272cfeaa4c44459cafba8/docs/cli.rst#L2125