[3.7] bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231). (GH-10253)
(cherry picked from commit 3f819ca138db6945ee4271bf13e42db9f9b3b1e4)
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index e9b82ee..3afc77b 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -379,8 +379,8 @@
Handling boolean (flag) options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Flag options---set a variable to true or false when a particular option is seen
----are quite common. :mod:`optparse` supports them with two separate actions,
+Flag options---set a variable to true or false when a particular option is
+seen---are quite common. :mod:`optparse` supports them with two separate actions,
``store_true`` and ``store_false``. For example, you might have a ``verbose``
flag that is turned on with ``-v`` and off with ``-q``::
@@ -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::