feat: Intra-line double link interaction

This commit is contained in:
xiaodong zuo
2022-08-19 11:13:15 +08:00
parent dd1b160ef4
commit 2406f9556f
3 changed files with 57 additions and 55 deletions
@@ -508,21 +508,19 @@ export class AsyncBlock {
id: item.blockId,
});
if (linkBlock) {
let children = linkBlock.getProperties().text?.value || [];
if (children.length === 1 && !children[0].text) {
children = [{ text: 'Untitled' }];
}
if (
children.map(v => v.text).join('') !==
(item.children || []).map((v: any) => v.text).join('')
) {
const newItem = {
...item,
children: children,
};
values.splice(i, 1, newItem);
}
let children = linkBlock?.getProperties().text?.value || [];
if (children.length === 1 && !children[0].text) {
children = [{ text: 'Untitled' }];
}
if (
children.map(v => v.text).join('') !==
(item.children || []).map((v: any) => v.text).join('')
) {
const newItem = {
...item,
children: children,
};
values.splice(i, 1, newItem);
}
}
}