Markdown highlighting bug: formatting spreads to further lines.

Steps to reproduce:
Go to : CodeMirror: Markdown mode
Paste in the following:

**foo ** bar


Note that it is formatted as the following:
Screenshot 2021-07-16 3.37.39 PM

Which is not the expected result. Why are bar and baz bolded?
I’ve been told foo shouldn’t be bolded either, and referenced to this demo.
I originally reported the bug here, but it appears to be a problem with this software (CodeMiror), not that one (Joplin), since you can even see it in the web-demo.

Because of technical limitations, the in-editor parser doesn’t look ahead beyond the current line, so it cannot pre-match inline style markers. The ** with spaces around them is ignored, since it’s not a valid marker. Thus, the marker at the start of the paragraph is taken to open a strong span, and it never finds a valid closing marker for that, making the whole paragraph bold. This is unlikely to change (though the Markdown parser in CodeMirror 6 does handle it properly)