Lexical version: 0.38.2
Steps To Reproduce
- Load previously stored serialized state with multiple paragraphs.
- Notice (console) how there are 4x \n between paragraphs.
- Now add a space at the end.
- Notice how there are now 2x \n between paragraphs.
- Select end and press Enter 2x and type anything.
- Notice there are 4x \n.
Link to code example: https://codesandbox.io/p/devbox/priceless-meadow-kmlmj2
The current behavior
Inconsistent number of new lines in between paragraphs in $getRoot().getTextContent() output.
The expected behavior
Consistent number of new lines in between paragraphs in $getRoot().getTextContent() output.
Impact of fix
I am using $getRoot().getTextContent() to get text diff between initial and final state. The inconsistencies report fake addition/removals of new lines.
Lexical version: 0.38.2
Steps To Reproduce
Link to code example: https://codesandbox.io/p/devbox/priceless-meadow-kmlmj2
The current behavior
Inconsistent number of new lines in between paragraphs in $getRoot().getTextContent() output.
The expected behavior
Consistent number of new lines in between paragraphs in $getRoot().getTextContent() output.
Impact of fix
I am using
$getRoot().getTextContent()to get text diff between initial and final state. The inconsistencies report fake addition/removals of new lines.