style(demo): default cat image size to small (35%) in demo seed notes

This commit is contained in:
tianma-if committed 2026-07-23 00:55:05 +08:00
1 parent 1e56a1dca3
commit 1c9705fcd9
1 file changed
+13
+13
View File
@@ -5353,6 +5353,19 @@ const ensureDemoSeed = async (
}
const contentJson = markdownToDoc(memo.markdown);
const applyDemoImageWidths = (nodes: any[]) => {
for (const node of nodes) {
if (node.type === "image") {
node.attrs = { ...node.attrs, width: 35 };
}
if (Array.isArray(node.content)) {
applyDemoImageWidths(node.content);
}
}
};
if (Array.isArray(contentJson.content)) {
applyDemoImageWidths(contentJson.content);
}
const contentText = docToText(contentJson);
const contentHash = await sha256(memo.markdown + JSON.stringify(contentJson));