mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 04:20:26 +02:00
Fix normalization to join adjacent text nodes
This commit is contained in:
@@ -982,6 +982,7 @@ const Node = {
|
||||
|
||||
/**
|
||||
* Join a node by `key` with another `withKey`.
|
||||
* It brings Node<key> after Node<WithKey>
|
||||
*
|
||||
* @param {String} key
|
||||
* @param {String} withKey
|
||||
|
@@ -112,7 +112,7 @@ const NO_ADJACENT_TEXT_RULE = {
|
||||
normalize: (transform, node, pairs) => {
|
||||
return pairs.reduce((t, pair) => {
|
||||
const [ first, second ] = pair
|
||||
return t.joinNodeByKey(first.key, second.key)
|
||||
return t.joinNodeByKey(second.key, first.key)
|
||||
}, transform)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user