An underscore-wrapped phrase immediately after a --- renders plainly instead of in italics.
E.g. it---by design---_cannot have side-effects_. renders like this:

But if you replace the latter --- with —, it works as intended.
So it---by design—_cannot have side-effects_. renders like this:
