simonw / sqlite-utils

Python CLI utility and library for manipulating SQLite databases
https://sqlite-utils.datasette.io
Apache License 2.0
1.64k stars 111 forks source link

Tiny typographical error in install/uninstall docs #493

Open simonw opened 2 years ago

simonw commented 2 years ago

Added in:

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

The insert –convert and query –functions options

image

But I want it to display insert --convert and not insert –convert there.

Here's the code: https://github.com/simonw/sqlite-utils/blob/85247038f70d7eb2f3e272cfeaa4c44459cafba8/docs/cli.rst#L2125

simonw commented 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.

chapmanjacobd commented 2 years ago

this is likely what you are looking for: https://stackoverflow.com/a/51076749/697964

but yeah I would say just disable smart quotes

simonw commented 1 year ago

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:

image
tobych commented 5 months ago

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.