Use hyphenation EXCEPT in code blocks

I’ve written a technical book in Scrivener and am struggling with hyphenation.

I want to turn on hyphenation in the body text to eliminate obvious justification (see screenshot). When I turn it on in the compile settings, all the body text has a wonderful even density, and Scrivener does a great job of determining where to place the hyphens.

But in code blocks and code spans, hyphenation is not welcome. Scrivener is blissfully unaware of this fact. Code must be executable by a computer if someone typed it in as shown, and the hyphens will introduce errors.

So, how can I talk Scrivener into using hyphenation everywhere except code blocks and code spans?
Screen Shot 2019-08-19 at 6.48.27 PM.png