Where find the splite/new-line logic in github?

Hello, where can I find on github the internal logic of prosemirror that prevents the addition of a div/span in the div contenteditable=true when the Enter key is pressed please?

There is no such logic, really. What the editor does is let the DOM change happen, parse the result into its document schema, and then update the DOM to reflect the updated document.