Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): extract text blocks markdown from doc (#9879)

donteatfriedricec0eb73589088
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/utils/extract.ts b/packages/frontend/core/src/blocksuite/presets/ai/utils/extract.ts
index fa7b0ea93b..30339052b6 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/utils/extract.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/utils/extract.ts
@@ -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);