Steps to reproduce on demo site:
- Switch output to Markdown
- Type a few words into the editor (e.g. "foo bar baz")
- Highlight all text and click either italics button in toolbar
- Rich text editor should show "foo bar baz"
- Markdown editor should show "_foo bar baz_"
- Highlight middle word (e.g. "bar") and click italics button again
- Rich text editor should show "foo bar baz"
- Markdown editor should show "_foo _bar_ baz_"
- Copy generated markdown and refresh page
- Switch output to Markdown and paste into markdown editor
- Rich text editor shows "foo _bar baz_"
The steps above show a similar issue for strikethrough styling, though not for bold.
edit: I realized that you don't necessarily have to de-style text in the middle of the string to reproduce this bug. De-styling text at the end of the string will also cause this bug, though de-styling text at the beginning does not. For example, "foo_ bar baz_" renders properly in the editor, but "_foo bar _baz" does not.