migrate text nodes to use ranges
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -84,10 +84,8 @@ function createInline(type, props = {}, nodes) {
|
|||||||
*/
|
*/
|
||||||
function createText(value, data) {
|
function createText(value, data) {
|
||||||
const node = { kind: 'text', data };
|
const node = { kind: 'text', data };
|
||||||
if (isArray(value)) {
|
const ranges = isArray(value) ? value : [{ text: value }];
|
||||||
return { ...node, ranges: value };
|
return { ...node, ranges };
|
||||||
}
|
|
||||||
return {...node, text: value };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function processMarkNode(node, parentMarks = []) {
|
function processMarkNode(node, parentMarks = []) {
|
||||||
|
Reference in New Issue
Block a user