<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant Lexical packages to make sure your issue has not already been fixed. --> Lexical version: 0.44 ## Steps To Reproduce 1. Paste specific content: > hello world > > \`\`\` > > echo hello world > > \`\`\` 2. Press enter on the last line ( with ```) 3. Trigger Undo command <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than Lexical. Issues without reproduction steps or code examples may be closed as not actionable. --> Link to code example: https://playground.lexical.dev/#doc=H4sIAAAAAAAAE9VUwWrDMAz9lfLOpqSjW1p_wM6DHMcgJtYag2sFRelWSv59ON3ostt6WXey9ITee5KNTyAflKVSpwR7gjBrPps2RC-UYJ9_JJ7UhQhbGLyy7J1O4Z49wSJlJMKg12PMAAyU3hUWLcXIizeW6DN47HJ5qhkcSPrACXY1vhj4INTolKchxotOZgvJUzprfnJ0TtxOXNfOiM66jxeHOa2-XI1mNtWfiF6_yrqub26F109DTcuLW34d__2ifi8z_QIzq6NBdL1W7kAedlWW2_L-7mGz2RalQc-DNLnvKbrjTnhI_ns3iuV6vSwwfgB-F9tGbgQAAA <!-- Please provide a CodeSandbox (https://codesandbox.io/s/new) or (https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-plain-text?file=src%2FApp.tsx&terminalHeight=0&ctl=1&showSidebar=0&devtoolsheight=0&view=preview), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. --> ## The current behavior Editor crushes, backticks transformation are not undone https://github.com/user-attachments/assets/944f1544-abe3-40a1-98d3-14d594fa2be8 ## The expected behavior Editor does not crush, code block removes and return backticks ## Impact of fix It's hard to say what exactly is causing the editor to crash, as I discovered this bug when using content while researching other issues
Lexical version: 0.44
Steps To Reproduce
Paste specific content:
Press enter on the last line ( with ```)
Trigger Undo command
Link to code example: https://playground.lexical.dev/#doc=H4sIAAAAAAAAE9VUwWrDMAz9lfLOpqSjW1p_wM6DHMcgJtYag2sFRelWSv59ON3ostt6WXey9ITee5KNTyAflKVSpwR7gjBrPps2RC-UYJ9_JJ7UhQhbGLyy7J1O4Z49wSJlJMKg12PMAAyU3hUWLcXIizeW6DN47HJ5qhkcSPrACXY1vhj4INTolKchxotOZgvJUzprfnJ0TtxOXNfOiM66jxeHOa2-XI1mNtWfiF6_yrqub26F109DTcuLW34d__2ifi8z_QIzq6NBdL1W7kAedlWW2_L-7mGz2RalQc-DNLnvKbrjTnhI_ns3iuV6vSwwfgB-F9tGbgQAAA
The current behavior
Editor crushes, backticks transformation are not undone
Screen.Recording.2026-05-26.at.02.44.15.mov
The expected behavior
Editor does not crush, code block removes and return backticks
Impact of fix
It's hard to say what exactly is causing the editor to crash, as I discovered this bug when using content while researching other issues