2 line breaks = new paragraph
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 659
- Forks
- 133
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 110
Description
In a previous feature (#2761) I requested removing the auto-double space feature when selecting the Enter key. This was particularly problematic for mobile devices, since a single line break with Shift + Enter was not possible. Ultimately, it was decided not to change this behavior for web, but for mobile it was modified such that two spaces would equate to a new paragraph (#2775).
I'm wondering if we can at least make a modification in web where two single spaces (Shift + Enter twice) will convert to a new paragraph. Or put differently, Shift + Enter twice is treated the same as Enter once.
There are three main reasons for this.
- It flows with the traditional markdown logic, whereby a line break between two lines of texts signifies a new paragraph.
- This logic will be consistent with the new behavior in mobile (#2775).
- It creates less mental burden on the user. There are times when I would like to create two spaces in between paragraphs, to signify a new section/chapter. Currently, to do this properly I will have to hit
Shift + Enteronce, and thenEnteronce -- two separate actions. Otherwise, it won't be treated as a new paragraph and formatting will carry over. This is an extra mental step that seems unnecessary.
Note: for users that like the auto-double spacing with the Enter key, this won't change anything.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by locating the web editor's handling of Enter and Shift+Enter, then compare it with the mobile behavior described in #2775. Done means two Shift+Enter actions create the same paragraph boundary as one Enter without changing existing single-Enter behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- content, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100