Make code block Enter behavior the same as quote block (#6010)

This commit is contained in:
Tom Moor
2023-10-16 19:13:23 -04:00
committed by GitHub
parent bedad9d802
commit 1ce0d3470e
2 changed files with 20 additions and 4 deletions

View File

@@ -86,8 +86,7 @@ export const newlineInCode: Command = (state, dispatch) => {
return false;
}
const { tr, selection } = state;
const text = selection?.$anchor?.nodeBefore?.text;
const text = selection.$anchor.nodeBefore?.text;
let newText = "\n";
if (text) {