-
Notifications
You must be signed in to change notification settings - Fork 9
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: migrating magic block tables with breaks #976
Conversation
● One | ||
● Two |
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.
These newlines are unfortunate, but they render ok.
visit(cell, 'break', (_, index, parent) => { | ||
parent.children.splice(index, 1, { type: 'text', value: '\n' }); | ||
}); |
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.
so this just converts breaks to a "\n"
character? (any chance that'll break Shift+Return sequences within table cells? or any other potential externalities?)
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.
It shouldn't, the editor doesn't create break
nodes explicitly, but leaves it up the the current rendering library to decide how to serialize newlines. This is only an issue because remark < v8 used break
nodes, but remark >=9 doesn't and just leaves the newlines in place.
This code should only trigger during the migration.
This PR was released!🚀 Changes included in v7.6.2 |
🧰 Changes
Fixes breaks in magic block tables.
🧬 QA & Testing