-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Documentation: Double hyphens on long options in invocation.html compiled as endashes in HTML builder #3781
Copy link
Copy link
Closed
Description
The long options on the ["Invocation" documentation page](http://www.sphinx-doc.org/en/stable/invocation.html) are displayed with only a single hyphen/dash:
```
The sphinx-quickstart script has several options:
-q, –quiet
Quiet mode that will skips interactive wizard to specify options. This option requires -p, -a and -v options.
-h, –help, –version
Display usage summary or Sphinx version.
```
The [`.rst` source](https://raw.githubusercontent.com/sphinx-doc/sphinx/stable/doc/invocation.rst) correctly has two hyphens, but per, e.g., [this Stack Overflow post](http://stackoverflow.com/questions/21574606/how-to-make-appear-in-sphinx-instead-of), it appears that `html_use_smartypants` is at fault.
~~~Since the raw `rst` is not a primary documentation product, inserting a "non-space" between the hyphens may suffice?~~~
~~~`--quiet` --> `-\ -quiet`~~~
This appears to be a general problem in the interaction of `.. option::` and `smartypants`; hacking the arguments to `.. option::` doesn't fix the problem; and in general there may be documentation (e.g., docstrings) where the raw ReST is a first-class documentation object, and a hacky workaround would be undesirable even if it worked.
Reactions are currently unavailable