-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
💪 phase/solvedPost is donePost is done
Description
Subject of the issue
i have some diffs, where i get an array for inserted nodes as an array.
Why this his happening?
Your environment
macOS 10.15.3
unist-diff
node v12.13.1
npm 6.14.5
Steps to reproduce
i see it also in the example
Expected behaviour
nodes should have index keys in order like the removed, so
{ '1': { type: 'insert',
left: null,
right:
{ type: 'element',
tagName: 'strong',
properties: {},
children: [ { type: 'text', value: 'importance' } ] } },
'3':
{ type: 'remove',
left:
{ type: 'element',
tagName: 'b',
properties: {},
children: [ { type: 'text', value: 'importance' } ] },
right: null },
'5': { type: 'insert',
left: null,
right:
{ type: 'element',
tagName: 'em',
properties: {},
children: [ { type: 'text', value: 'emphasis' } ] } } ],
'6':
{ type: 'remove',
left:
{ type: 'element',
tagName: 'i',
properties: {},
children: [ { type: 'text', value: 'emphasis' } ] },
right: null },Actual behaviour
somehow other sorted
Documentation
it was not documented in the README in the return types
Metadata
Metadata
Assignees
Labels
💪 phase/solvedPost is donePost is done