Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Nov 8, 2022

Summary

To preserve soft breaks within markdown files we preserve all whitespaces, so we must not introduce additional new lines after <br> elements.

@susnux susnux added bug Something isn't working 3. to review javascript labels Nov 8, 2022
@cypress
Copy link

cypress bot commented Nov 8, 2022



Test summary

105 1 0 0Flakiness 2


Run details

Project Text
Status Failed
Commit 7cf907f ℹ️
Started Nov 10, 2022 1:01 PM
Ended Nov 10, 2022 1:08 PM
Duration 06:43 💡
OS Linux Ubuntu -
Browser Electron 106

View run in Cypress Dashboard ➡️


Failures

cypress/e2e/sections.spec.js Failed
1 Content Sections > Heading anchors > Anchor scrolls into view

Flakiness

workspace.spec.js Flakiness
1 Workspace > formats text
links.spec.js Flakiness
1 test link marks > link preview > shows a link preview

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@susnux
Copy link
Contributor Author

susnux commented Nov 8, 2022

/compile

@max-nextcloud
Copy link
Collaborator

Looks like the common mark specs expect a newline after a <br /> tag. The approach here seems fine - but i wonder how / if we can keep the specs.

I wonder if we could still keep this and use some css or so to ignore / remove the extra blank line.

@juliusknorr
Copy link
Member

Thanks again for the fix @susnux

It would be great to have a test case for this case

To preserve softbreaks within md files we preserve all whitespaces,
so we must not introduce additional new lines after `<br>` elements.

Signed-off-by: Ferdinand Thiessen <[email protected]>
No additional new line should be added after hard line breaks,
this is tested by a new tiptap test.
Modified CommonMark rendering test to allow hard breaks without
newline.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux
Copy link
Contributor Author

susnux commented Nov 10, 2022

@juliushaertl Added a test case for this.

@max-nextcloud I first thought about adding a special "softbreak" node which would be rendered as a space, but that might add too much complexity.

@susnux
Copy link
Contributor Author

susnux commented Nov 10, 2022

/compile

Signed-off-by: nextcloud-command <[email protected]>
@juliusknorr juliusknorr merged commit 2fd9914 into master Nov 10, 2022
@juliusknorr juliusknorr deleted the fix/3380 branch November 10, 2022 21:38
@juliusknorr
Copy link
Member

/backport to stable25

@backportbot-nextcloud
Copy link

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

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 javascript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hard line break broken

5 participants