mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-24 09:13:24 +01:00
* Defined conditions to always split nodes Those conditions are: - When the anchor does not lie at the start of a node. - When the focus does not lie at the end of a node. * prev variable now points to correct updated node. Previously, in the case the previous node gets merged in last iteration, prev pointer could be pointing to the wrong node. That posed problems, especially when normalizing empty text nodes. So, now in every iteration, we get a copy of updated node structure, and take value of prev from that. * Test to check splitting and normalization logic. - In this, since anchor and focus bleeds on both sides, splits happen. - Empty text nodes are introduced on either side. - New properties are set in the new node selection. - Normalization happens and takes care of those empty text nodes. * Create two-lies-appear.md * Update two-lies-appear.md Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com>