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 insertContents for prepending block embeds #3842

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

luin
Copy link
Member

@luin luin commented Jul 25, 2023

There was a bug when the delta passed to insertContents starts with a block embed: The attributes of the block embed were not applied because insertContents called formatAt against a wrong index.

This PR fixed the issue. Added a test case and also fixed an issue where in fuzz tests, we didn't generate a random doc whose first blot was block embed.

@luin luin force-pushed the zh-insertcontents-blockembed branch from 11f46f1 to 3f90b0d Compare July 25, 2023 12:51
@luin luin force-pushed the zh-insertcontents-blockembed branch from 3f90b0d to 47515f5 Compare July 25, 2023 12:52
@luin luin marked this pull request as ready for review July 25, 2023 12:58
@luin luin merged commit bca7830 into develop Jul 25, 2023
5 checks passed
@luin luin deleted the zh-insertcontents-blockembed branch July 25, 2023 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants