Automattic / simplenote-macos

Simplenote for macOS
https://simplenote.com
GNU General Public License v2.0
1.49k stars 168 forks source link

Markdown: Making more than two consecutive lines in a paragraph Italic completely scrambles the text #205

Open KokkieH opened 6 years ago

KokkieH commented 6 years ago

Reported via Twitter

To replicate

What I expected

For the text wrapped in underscores to become Italic.

What happened instead

All but the last two lines of the italicized section became completely scrambled. Removing the trailing underscore fixes the text, but resizing the app window so the italicized section spans fewer than three lines has no effect once the text has been scrambled.

simplenote

Other observations

Tested on the Mac app v 1.3.3

dmsnell commented 5 years ago

also noted with the inline code block

doozy mov

suspect is a certain replace text function which is splitting UTF-16 code points. I didn't have a chance to debug but it caught my attention seeing it. possibly we're splitting a grapheme cluster where an invalid split is?