mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
fix(core): extract text blocks markdown from doc (#9879)
[AF-2162](https://linear.app/affine-design/issue/AF-2162/ai-提取-markdown-内容不完整)
This commit is contained in:
@@ -21,7 +21,6 @@ import {
|
||||
getSelectedTextContent,
|
||||
getTextContentFromBlockModels,
|
||||
selectedToCanvas,
|
||||
traverse,
|
||||
} from './selection-utils';
|
||||
|
||||
export async function extractSelectedContent(
|
||||
@@ -165,7 +164,6 @@ export async function extractMarkdownFromDoc(
|
||||
!BlocksUtils.matchFlavours(model, ['affine:image', 'affine:database'])
|
||||
);
|
||||
const drafts = textModels.map(toDraftModel);
|
||||
drafts.forEach(draft => traverse(draft, drafts));
|
||||
const slice = Slice.fromModels(doc, drafts);
|
||||
|
||||
const snapshot = transformer.sliceToSnapshot(slice);
|
||||
|
||||
Reference in New Issue
Block a user