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(paste): collapse whitespace before pasting #4872

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

max-nextcloud
Copy link
Collaborator

@max-nextcloud max-nextcloud commented Oct 17, 2023

📝 Summary

By default html does not display whitespace but text does. Remove newlines when pasting to ensure consistency with the previous display.

Keep the newlines when they are also displayed in the source.

🖼️ Screenshots

🏚️ Before

grafik

🏡 After

grafik

🏁 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 is not required

@mejo-
Copy link
Member

mejo- commented Oct 19, 2023

Probably also will fix #4768.

Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

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

Max gave me a walkthrough through the code. Very clean and thorough solution, thanks a lot! Only nitpicking comments.

@juliushaertl juliushaertl added bug Something isn't working 2. developing labels Oct 19, 2023
By default html does not display whitespace but text does.
Remove newlines when pasting to ensure consistency with the previous display.

Keep the newlines when they are also displayed in the source.

* Resolves #4602.

Signed-off-by: Max <[email protected]>
Signed-off-by: Jonas <[email protected]>
@mejo- mejo- force-pushed the fix/4602-remove-newlines-in-pastes branch from 6d3fd63 to a958e8a Compare October 24, 2023 13:25
@mejo-
Copy link
Member

mejo- commented Oct 24, 2023

/backport to stable27

@mejo-
Copy link
Member

mejo- commented Oct 24, 2023

/backport to stable26

@mejo-
Copy link
Member

mejo- commented Oct 24, 2023

Cypress failures are unrelated.

@mejo- mejo- merged commit 72e9537 into main Oct 24, 2023
29 of 32 checks passed
@mejo- mejo- deleted the fix/4602-remove-newlines-in-pastes branch October 24, 2023 15:27
@ChristophWurst
Copy link
Member

Thank you!

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
4 participants