-
Notifications
You must be signed in to change notification settings - Fork 446
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-tools): fix Google Docs preprocessing issue on Windows #4955
Conversation
On windows the Google Docs root-B was not stripped like it should be. Slightly different document structure. Use a more explicit xpath to get the Google Docs root node. Also prefer textContent over innerText when extracting span text. I was not able to have the tests running properly without this.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
No changes to documentation |
Component Testing Report Updated Sep 27, 2023 11:29 AM (UTC)
|
e7bf4c3
to
4151f2e
Compare
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.
Thanks @skogsmaskin! Tested and all LGTM
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.
👍
Description
This will fix an issue on Windows when serializing a Google Docs HTML fragment into blocks.
The clipboard HTML was slightly different on Windows and our code didn't take that into account.
I have made some xpath matchers more specific and resilient now so they work both places.
I have also added tests for this.
What to review
That pasting from Google Docs into the PTE on Windows and MacOS will work correctly, without adding everything as bold.
Notes for release