1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 01:19:52 +02:00

Fix normalizing dirty paths (#2222)

#### Is this adding or improving a _feature_ or fixing a _bug_?

Fix.

#### What's the new behavior?

The dirty paths in a change are now transformed against incoming operations, such that they don't get out of sync as normalizations occur. This is a rough pass to get correctness and the bug fixed, and we can later optimize lots of the little details for performance.

#### Have you checked that...?

<!-- 
Please run through this checklist for your pull request: 
-->

* [x] The new code matches the existing patterns and styles.
* [x] The tests pass with `yarn test`.
* [x] The linter passes with `yarn lint`. (Fix errors with `yarn prettier`.)
* [x] The relevant examples still work. (Run examples with `yarn watch`.)

#### Does this fix any issues or need any specific reviewers?

Fixes: #2211
Fixes: #2215
Fixes: #2194
This commit is contained in:
Ian Storm Taylor
2018-10-02 15:57:48 -07:00
committed by GitHub
parent 9ed08c1544
commit d84f5072c1
3 changed files with 191 additions and 103 deletions

View File

@@ -39,7 +39,7 @@ export const output = {
nodes: [
{
object: 'text',
key: '11',
key: '13',
leaves: [
{
object: 'leaf',
@@ -69,7 +69,7 @@ export const output = {
},
{
object: 'text',
key: '12',
key: '14',
leaves: [
{
object: 'leaf',
@@ -88,7 +88,7 @@ export const output = {
nodes: [
{
object: 'text',
key: '13',
key: '11',
leaves: [
{
object: 'leaf',
@@ -118,7 +118,7 @@ export const output = {
},
{
object: 'text',
key: '14',
key: '12',
leaves: [
{
object: 'leaf',