You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a bug where it's possible to get paragraph elements inserted directly into a code block plugin without them being normalized into code lines. This then breaks most custom behaviour for code blocks.
Steps
Go to this codesandbox
Delete the last line of the codeblock.
Delete the last paragraph of the document, backspacing into the codeblock.
Notice that there is now a paragraph element in the codeblock.
I also saw the opposite issue, when code lines are created outside of code block, but I can't reproduce it right now on Codesandbox because it throws an error:
But it's reproducible in my app like that:
Have an empty paragraph element
Now make an empty code block after that
Press backspace to delete code block
Now you have empty code line without code block in place of the paragraph
@O4epegb Right. I'll have a check and see if I can fix that too. I've been away from my PR for a little bit, but I should be able to wrap it up next week.
@O4epegb Right. I'll have a check and see if I can fix that too. I've been away from my PR for a little bit, but I should be able to wrap it up next week.
Description
There's a bug where it's possible to get paragraph elements inserted directly into a code block plugin without them being normalized into code lines. This then breaks most custom behaviour for code blocks.
Steps
Sandbox
https://codesandbox.io/s/sandpack-project-forked-s1kv7h
Expectation
Codeblock should only ever have code lines in it.
Environment
0.78
0.79
The text was updated successfully, but these errors were encountered: