Repository: ipython/ipython

Issue:
Double-dash becomes en-dash in docs for "cd" magic
The double-dash in [this line][line] gets rendered as an en-dash (Unicode U+2013) in [the docs][docs] for the `cd` magic.

I don't know how to fix it, sorry, otherwise I'd submit a pull request :frowning_face: 

  [line]: https://github.com/ipython/ipython/blob/86d24741188b0cedd78ab080d498e775ed0e5272/IPython/core/magics/osm.py#L317
  [docs]: https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-cd


Discussion:

Resolving patch:
diff --git a/IPython/core/magics/osm.py b/IPython/core/magics/osm.py
--- a/IPython/core/magics/osm.py
+++ b/IPython/core/magics/osm.py
@@ -302,33 +302,36 @@ def cd(self, parameter_s=''):
         """Change the current working directory.
 
         This command automatically maintains an internal list of directories
-        you visit during your IPython session, in the variable _dh. The
-        command %dhist shows this history nicely formatted. You can also
-        do 'cd -<tab>' to see directory history conveniently.
-
+        you visit during your IPython session, in the variable ``_dh``. The
+        command :magic:`%dhist` shows this history nicely formatted. You can
+        also do ``cd -<tab>`` to see directory history conveniently.
         Usage:
 
-          cd 'dir': changes to directory 'dir'.
-
-          cd -: changes to the last visited directory.
+          - ``cd 'dir'``: changes to directory 'dir'.
+          - ``cd -``: changes to the last visited directory.
+          - ``cd -<n>``: changes to the n-th directory in the directory history.
+          - ``cd --foo``: change to directory that matches 'foo' in history
+          - ``cd -b <bookmark_name>``: jump to a bookmark set by %bookmark
+          - Hitting a tab key after ``cd -b`` allows you to tab-complete
+            bookmark names.
 
-          cd -<n>: changes to the n-th directory in the directory history.
+          .. note::
+            ``cd <bookmark_name>`` is enough if there is no directory
+            ``<bookmark_name>``, but a bookmark with the name exists.
 
-          cd --foo: change to directory that matches 'foo' in history
-
-          cd -b <bookmark_name>: jump to a bookmark set by %bookmark
-             (note: cd <bookmark_name> is enough if there is no
-              directory <bookmark_name>, but a bookmark with the name exists.)
-              'cd -b <tab>' allows you to tab-complete bookmark names.
 
         Options:
 
-        -q: quiet.  Do not print the working directory after the cd command is
-        executed.  By default IPython's cd command does print this directory,
-        since the default prompts do not display path information.
+        -q               Be quiet. Do not print the working directory after the
+                         cd command is executed. By default IPython's cd
+                         command does print this directory, since the default
+                         prompts do not display path information.
+
+        .. note::
+           Note that ``!cd`` doesn't work for this purpose because the shell
+           where ``!command`` runs is immediately discarded after executing
+           'command'.
 
-        Note that !cd doesn't work for this purpose because the shell where
-        !command runs is immediately discarded after executing 'command'.
 
         Examples
         --------


Test patch: