Automattic / Automattic/simplenote-macos

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

Open
#205 1 comment 1 reaction 0 assignees View on GitHub
[feature] editor [feature] markdown bug
Dominant language
Swift
Stars
1.6k
Forks
172
Avg merge
11h 17m
Merged PRs (30d)
3

Description

Reported via [Twitter](https://twitter.com/rcveeder/status/987881239930695680)

### To replicate

* Open a new note. Make sure it has Markdown enabled
* Add a paragraph that has at least three lines
* Wrap any section of text in underscores to make it italic, but make sure the section spans at least three lines

### 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

* The scrambled text does not appear to sync to other versions of the app (confirmed on web, Windows and Android). I'm guessing it's because they don't have live Markdown preview like the Mac app.

* If the underscores are added in another version of the app, the text displays correctly italicized in the Mac app, but gets scrambled if you try to remove the trailing underscore in the Mac app. Not if you remove the initial underscore, though.

* The issue does not occur in the Mac app if you add the trailing underscore first. In that case the text becomes correctly italicized upon inserting the initial underscore.

Tested on the Mac app v 1.3.3

Contributor guide

Open the contributing guide

Research direction

Reproduce this in the Mac app v1.3.3 using a new Markdown-enabled note, a paragraph of at least three lines, and an italic section spanning at least three lines. Compare the display when the initial and trailing underscores are entered in different orders; done means the text remains correctly italicized without scrambling and the content stays safe to sync.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, swift
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.