-
-
Notifications
You must be signed in to change notification settings - Fork 625
fix: add more lenient parsing for code blocks, to accept newlines #2105 #2108
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
|
Alright I think a single test case to cover multi-line The one thing I was hesitant about was that blocks generally mark newlines with a line break node, but the parsed code block content is just one big multi-line string. But then I saw that it's because of the |
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.
@nperez0111 do you want me to add tests for this or are you good? Also
Summary
I only validated that this did what I expected, I do not think that this is actually complete, we should add tests for this specific behavior.
Closes #2105
Rationale
This allows us to more leniently parse existing code blocks from arbitrary HTML in a way which is more user-friendly.
Changes
Impact
Testing
Screenshots/Video
Checklist
Additional Notes