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

Fix block images always add additional newlines on the end of the file #3445

Merged
merged 2 commits into from
Nov 18, 2022

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Nov 17, 2022

📝 Summary

This fixes block images adding additional newlines, without this images at the end of a file will add two additional newlines.
This is fixed by using closeBlock within the toMarkdown function instead of always enforcing two newlines.

The tests are adjusted accordingly.

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

@susnux susnux added 3. to review bug Something isn't working feature: formatting Features related to text formatting and node types bug: regression labels Nov 17, 2022
@susnux
Copy link
Contributor Author

susnux commented Nov 17, 2022

/compile

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

cypress bot commented Nov 17, 2022



Test summary

106 0 0 0Flakiness 1


Run details

Project Text
Status Passed
Commit 98517ff ℹ️
Started Nov 17, 2022 7:06 PM
Ended Nov 17, 2022 7:13 PM
Duration 06:26 💡
OS Linux Ubuntu -
Browser Electron 106

View run in Cypress Dashboard ➡️


Flakiness

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

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

Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

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

Thanks a lot for addressing this. It fixes an annoying issue and the approach is much cleaner.

src/tests/markdown.spec.js Show resolved Hide resolved
@max-nextcloud max-nextcloud merged commit 95f85cd into master Nov 18, 2022
@delete-merged-branch delete-merged-branch bot deleted the fix/image-adds-newlines branch November 18, 2022 14:53
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 feature: formatting Features related to text formatting and node types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not add newlines after block image at the end of md file
3 participants