How to handle two dashes in ReST
python-sphinx, restructuredtext
Solution
This is a configuration option in Sphinx that is on by default: the `html_use_smartypants` option (http://sphinx-doc.org/config.html?highlight=dash#confval-html_use_smartypants).
If you turn off the option, then you will have to use the Unicode character '–' if you want an en-dash.
Problem
I'm using Sphinx to document a command line utility written in Python. I want to be able to document a command line option, such as `--region` like this: ``` **--region** <region_name> ``` in ReST and then use Sphinx to to generate my HTML and man pages for me. This works great when generating man pages but in the generated HTML, the `--` gets turned into `-` which is incorrect. I have found that if I change my source ReST document to look like this: ``` **---region** <region_name> ``` The HTML generates correctly but now my man pages have `---` instead of `--`. Also incorrect. I've tried escaping the dashes with a backslash character (e.g. `\-\-`) but that had no effect. Any help would be much appreciated.