mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-19 05:31:56 +02:00
remove normalizeDocument transform
This commit is contained in:
@@ -144,7 +144,6 @@ import {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
normalizeDocument,
|
|
||||||
normalizeSelection,
|
normalizeSelection,
|
||||||
} from './normalize'
|
} from './normalize'
|
||||||
|
|
||||||
@@ -286,7 +285,6 @@ export default {
|
|||||||
* Normalize.
|
* Normalize.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
normalizeDocument,
|
|
||||||
normalizeSelection,
|
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.
|
* Normalize the selection.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user