I would expect the behavior of literalMidWordUnderscores to only affect underscores attached to non-space characters.
Example:
some text with__underscores__in middle where __ is used without spaces between words.
Actual Behavior:
If literalMidWordUnderscores is true then all text between two separate bolded words gets bolded.
__Once upon a time__, there was a little girl named __Goldilocks__.
Expected: Once upon a time, there was a little girl named Goldilocks.

I would expect the behavior of
literalMidWordUnderscoresto only affect underscores attached to non-space characters.Example:
some text with__underscores__in middlewhere__is used without spaces between words.Actual Behavior:
If
literalMidWordUnderscoresis true then all text between two separate bolded words gets bolded.__Once upon a time__, there was a little girl named __Goldilocks__.Expected: Once upon a time, there was a little girl named Goldilocks.