Automattic / simplenote-electron

Simplenote for Web, Windows, and Linux
https://app.simplenote.com
GNU General Public License v2.0
4.69k stars 553 forks source link

Fix: don't indent lines following an indented line (hanging indent) #3216

Closed codebykat closed 1 week ago

codebykat commented 3 weeks ago

Fix

Indenting the first line of a paragraph should only indent that line, not the following ones (otherwise known as a "hanging indent"). See Monaco docs. Since Simplenote is primarily a note editor and not a code editor, I think this is a sensible default.

Issue reported here.

An incidental thing I noticed is that it won't render properly in the Markdown preview, because a tab (four spaces) at the beginning of a paragraph is parsed as a code block. This is an existing issue so it doesn't necessarily need to be fixed in this PR, and it's one that other text editors have encountered (Obsidian, for example, has many complaints, e.g. #).

I have a follow-up PR containing some of my experiments to try to fix this... for now this PR also updates the showdown package to the latest version and updates some of its rendering options.

Release

Don't indent lines following an indenting line (hanging indent support)