mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-18 21:21:21 +02:00
remove normalizeDocument transform
This commit is contained in:
@@ -144,7 +144,6 @@ import {
|
||||
*/
|
||||
|
||||
import {
|
||||
normalizeDocument,
|
||||
normalizeSelection,
|
||||
} from './normalize'
|
||||
|
||||
@@ -286,7 +285,6 @@ export default {
|
||||
* Normalize.
|
||||
*/
|
||||
|
||||
normalizeDocument,
|
||||
normalizeSelection,
|
||||
|
||||
}
|
||||
|
@@ -1,20 +1,4 @@
|
||||
|
||||
/**
|
||||
* Normalize the document.
|
||||
*
|
||||
* @param {Transform} transform
|
||||
* @return {Transform}
|
||||
*/
|
||||
|
||||
export function normalizeDocument(transform) {
|
||||
let { state } = transform
|
||||
let { document } = state
|
||||
document = document.normalize()
|
||||
state = state.merge({ document })
|
||||
transform.state = state
|
||||
return transform
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize the selection.
|
||||
*
|
||||
|
Reference in New Issue
Block a user