Skip to content

Conversation

@YousefED
Copy link
Collaborator

@YousefED YousefED commented Dec 4, 2025

Summary

To reproduce the issue:

  • add a block ending with whitespace, e.g.: "Hello, "
  • open the AI menu (/ai)
  • ask "continue writing, same line"
  • use Sonnet 4.5

Without the code change in this PR, it would throw an "html diff" error because the whitespace would be (invalidly) discarded when parsing the HTML returned from the LLM.

This PR contains a fix, but breaks existing unit tests. Next steps:

  • Determine when we do and when we don't want preserveWhitespace
  • Add additional unit tests if needed

@vercel
Copy link

vercel bot commented Dec 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
blocknote Ready Ready Preview Dec 4, 2025 1:47pm
blocknote-website Ready Ready Preview Dec 4, 2025 1:47pm

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