bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231)

diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index e9b82ee..4f7bd43 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -388,8 +388,8 @@
    parser.add_option("-q", action="store_false", dest="verbose")
 
 Here we have two different options with the same destination, which is perfectly
-OK.  (It just means you have to be a bit careful when setting default values---
-see below.)
+OK.  (It just means you have to be a bit careful when setting default
+values---see below.)
 
 When :mod:`optparse` encounters ``-v`` on the command line, it sets
 ``options.verbose`` to ``True``; when it encounters ``-q``,
@@ -525,9 +525,9 @@
   default: ``"Usage: %prog [options]"``, which is fine if your script doesn't
   take any positional arguments.
 
-* every option defines a help string, and doesn't worry about line-wrapping---
-  :mod:`optparse` takes care of wrapping lines and making the help output look
-  good.
+* every option defines a help string, and doesn't worry about
+  line-wrapping---\ :mod:`optparse` takes care of wrapping lines and making
+  the help output look good.
 
 * options that take a value indicate this fact in their automatically-generated
   help message, e.g. for the "mode" option::