This is complicated. From the user POV, this is a bug.
From the dev POV, this is not a bug (as unexpected behavior).
This is the nature of a plain text editor enhanced to fake aspects of preview.
Unfortunately this aspect is hard to fake or even impossible.
I am gonna move this to Feature Requests.