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: Boolean/number props not getting parsed correctly #362

Merged
merged 6 commits into from
Oct 11, 2023

Conversation

matthewlipski
Copy link
Collaborator

The last release made block props able to be booleans or numbers, not just strings. While the type definitions for this are all correct, there is an issue when parsing block props. All props are rendered to HTML attributes, so they must be converted to strings. This means when parsing them, we must also figure out whether to parse they should actually be booleans or numbers, which we weren't doing before. E.g. copy/pasting an image would cause the second image's width prop to be a string instead of a number.

@vercel
Copy link

vercel bot commented Oct 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote-website ✅ Ready (Inspect) Visit Preview Oct 9, 2023 7:21pm

Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

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

nice. I think it's smart to add tests for this as this is core functionality

Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

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

nice that you added the test!

@matthewlipski matthewlipski merged commit 572ee42 into main Oct 11, 2023
1 check passed
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