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

Cells pasted from clipboard's tables won't contain unnecessary line breaks #10745

Merged
merged 7 commits into from Jan 31, 2024

Conversation

wszymanski
Copy link
Contributor

Context

The described bug also occurs for MacOS and Chrome browser. I've found a case which shows that problem. Finally, after a deeper investigation, I've discovered that it's not related only to Word files and tables inside them. The issue relates to how we parsed whitespaces as part of the HTML snippet. Word splits long text into a few lines for better readability. Until now, extra spaces (added to break text) have been preserved. That won't be done anymore. The only spaces are stored as &nbsp elements inside HTML elements, and we filter out other space characters.

How has this been tested?

Tested different tables with spaces at the start and the end of a single line/whole snippet.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature or improvement (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Additional language file or change to the existing one (translations)

Related issue(s):

  1. https://github.com/handsontable/dev-handsontable/issues/1597

Affected project(s):

  • handsontable
  • @handsontable/angular
  • @handsontable/react
  • @handsontable/vue
  • @handsontable/vue3

Checklist:

  • I have reviewed the guidelines about Contributing to Handsontable and I confirm that my code follows the code style of this project.
  • My change requires a change to the documentation.

@wszymanski wszymanski self-assigned this Jan 23, 2024
Copy link

github-actions bot commented Jan 23, 2024

Launch the local version of documentation by running:

npm run docs:review 0da32502d5a0adfc5aade15601dac5a6d240ddfb

@wszymanski wszymanski marked this pull request as draft January 23, 2024 09:47
@wszymanski wszymanski marked this pull request as ready for review January 23, 2024 10:47
Copy link
Member

@jansiegel jansiegel left a comment

Choose a reason for hiding this comment

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

  1. @magierg Unfortunately I'm not able to test it myself with MS Word, could I ask for your help with this?
  2. @wszymanski it's not a breaking change, correct?
  3. The code LGTM

@wszymanski
Copy link
Contributor Author

  1. @wszymanski it's not a breaking change, correct?

Correct.

@wszymanski wszymanski merged commit ffffb2f into develop Jan 31, 2024
21 checks passed
@wszymanski wszymanski deleted the feature/dev-issue-1597 branch January 31, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants