Skip to content

Long options, double dashes and em dashes

Raphaël Dias--Monteiro requested to merge rdm/dashes into master

From commit 18aea498:

Currently em dashes and en dashes are escaped by smartquotes (i.e. --- and -- are interpreted in their corresponding dash).

This is interesting for em dashes as assignments makes good use of them.

However double dashes are incorrectly escaped as en dashes. Indeed most command line option with leading double dash, i.e. long options, are wrongfully displayed.

Another important piece of info is that smartquotes does not permit to have only em dash escaped.

So, one solution could have been to escape double dashes with backslashes like what was first done for my lastname in source/intro/history/tiger_2022.rst with \-\-. This would have led to many escapes, that could potentially create other conflicts after.

Another solution, the one taken here, is not to escape dashes and to replace triple dashes --- directly by the em dash —. Similarly, if we were to want to use en dash.

Edited by Raphaël Dias--Monteiro

Merge request reports