-
Notifications
You must be signed in to change notification settings - Fork 109
Fix non-working hard line breaks #2455
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
Conversation
|
/backport to stable24 |
|
/backport d215431 to stable23 |
|
/backport d215431 to stable22 |
|
@juliushaertl have we a way to create a regression test for this behavior? |
|
Thanks for catching this. Looks good. |
b80efd0 to
9154a36
Compare
|
/compile amend / |
9154a36 to
4e4de45
Compare
|
/rebase |
4e4de45 to
f05f53c
Compare
|
/compile |
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
…wn transformation Signed-off-by: Julius Härtl <[email protected]>
4f2abd9 to
efb27a5
Compare
|
/compile |
Signed-off-by: nextcloud-command <[email protected]>
julien-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
The backport to stable24 failed. Please do this backport manually. |
|
The backport to stable23 failed. Please do this backport manually. |
|
The backport to stable22 failed. Please do this backport manually. |
|
Manual backport to 23/22 might need a bit more work to make it work with tiptap v1 |
|
Leaving for backport for the next maintenance releases. |
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