Skip to content

Conversation

@juliusknorr
Copy link
Member

Seems like the hard break plugin got lost during migration to tiptap v2 (https://github.com/nextcloud/text/blob/stable23/src/EditorFactory.js#L73)

Now the first commit restores the previous behaviour to support hard breaks in text. The second transforms the output markdown to use double space instead of a backslash at the line end to indicate the hard break, which is less intrusive in the plain markdown. Both are allowed according to https://spec.commonmark.org/0.30/#hard-line-breaks

The backslash is the default format provided by prosemirror-markdown:

https://github.com/ProseMirror/prosemirror-markdown/blob/master/src/to_markdown.ts#L107-L113

@juliusknorr juliusknorr linked an issue May 27, 2022 that may be closed by this pull request
@juliusknorr
Copy link
Member Author

/backport to stable24

@juliusknorr
Copy link
Member Author

/backport d215431 to stable23

@juliusknorr
Copy link
Member Author

/backport d215431 to stable22

@vinicius73
Copy link
Member

@juliushaertl have we a way to create a regression test for this behavior?

@max-nextcloud
Copy link
Collaborator

Thanks for catching this. Looks good.

@juliusknorr
Copy link
Member Author

/compile amend /

@juliusknorr juliusknorr removed the request for review from azul May 30, 2022 16:19
@juliusknorr juliusknorr changed the title Bugfix/hard break Fix non-working hard line breaks May 30, 2022
@juliusknorr
Copy link
Member Author

/rebase

@juliusknorr
Copy link
Member Author

/compile

@max-nextcloud
Copy link
Collaborator

/compile

Signed-off-by: nextcloud-command <[email protected]>
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@max-nextcloud max-nextcloud merged commit b548bf8 into master Jun 7, 2022
@delete-merged-branch delete-merged-branch bot deleted the bugfix/hard-break branch June 7, 2022 13:04
@backportbot-nextcloud
Copy link

The backport to stable24 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable23 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable22 failed. Please do this backport manually.

@juliusknorr
Copy link
Member Author

Manual backport to 23/22 might need a bit more work to make it work with tiptap v1

@juliusknorr
Copy link
Member Author

Leaving for backport for the next maintenance releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-Add possiblility for multiline: Shift+Enter (missing since NC24) Linebreaks in Texteditor do not conform to Markdown-Syntax

6 participants