Lexical version: ^0.32.1, 0.33.1 ## Steps To Reproduce 1. In rich-text editor, enter three lines of the text: aaa bbb ccc 2. Select only the middle line (bbb) 3. Apply code block formatting to the selection 4. Observe that the resulting code block unexpectedly includes ccc, instead of just wrapping the selected line Link to code example: https://playground.lexical.dev/ **Worth noting**: applying a code block to the last line works as expected https://github.com/user-attachments/assets/94aec4ed-47fd-461e-b8ea-5714382f4b19