mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
@@ -16,8 +16,8 @@ export const buildContentGetter = (ac: AccessController, doc: DocReader) => {
|
||||
.doc(docId)
|
||||
.can('Doc.Read');
|
||||
if (!canAccess) return undefined;
|
||||
const content = await doc.getFullDocContent(options.workspace, docId);
|
||||
return content?.summary.trim() || undefined;
|
||||
const content = await doc.getDocMarkdown(options.workspace, docId, true);
|
||||
return content?.markdown.trim() || undefined;
|
||||
};
|
||||
return getDocContent;
|
||||
};
|
||||
|
||||
@@ -47,7 +47,11 @@ export const buildDocContentGetter = (
|
||||
return;
|
||||
}
|
||||
|
||||
const content = await docReader.getDocMarkdown(options.workspace, docId);
|
||||
const content = await docReader.getDocMarkdown(
|
||||
options.workspace,
|
||||
docId,
|
||||
true
|
||||
);
|
||||
if (!content) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user