Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 line breaks = new paragraph #2809

Open
sailr7 opened this issue Aug 19, 2022 · 5 comments · Fixed by #3568
Open

2 line breaks = new paragraph #2809

sailr7 opened this issue Aug 19, 2022 · 5 comments · Fixed by #3568
Labels
enhancement New feature or request

Comments

@sailr7
Copy link

sailr7 commented Aug 19, 2022

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.

  1. It flows with the traditional markdown logic, whereby a line break between two lines of texts signifies a new paragraph.
  2. This logic will be consistent with the new behavior in mobile (Allow creating hard line breaks on mobile devices #2775).
  3. 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 + Enter once, and then Enter once -- 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.

@sailr7 sailr7 added the enhancement New feature or request label Aug 19, 2022
@marcelklehr
Copy link
Member

Let's wait for the final say on #2775

@max-nextcloud
Copy link
Collaborator

#3568 addressed the underlying problem and made adding line breaks possible on mobile. However I don't think it addressed the issue in question here. If i open a text document with current master, enter some test and press shift-enter twice I get two line breaks - not a new paragraph.

This may be a pretty rare situation - but still it would be great to have this turn into a new paragraph so I can also start say a list or a heading in the new line.

@max-nextcloud max-nextcloud reopened this Dec 14, 2022
@susnux
Copy link
Contributor

susnux commented Dec 14, 2022

How would you insert multiple hard line breaks? e.g.

hello\
\
\
world

@max-nextcloud
Copy link
Collaborator

I'm not sure if I understand your question correctly @susnux. I don't know if it's even possible in markdown - but the editor still does it.
When I type a line and then press shift-enter twice. The cursor will move down further - but it will still be in the previous paragraph only separated with hard breaks. So i cannot start a list by using * list and if i format that line - say into a quote it also affects the previous two lines.

Sadly my screen recording seems broken and only records a few seconds. Maybe this illustrates what i am trying to describe never the less.

Bildschirmaufzeichnung.vom.14.12.2022.16.12.15.webm

@marcelklehr
Copy link
Member

It's valid markdown. Multiple hard line breaks inside one paragraph should be supported, IMHO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
5 participants