style(demo): default cat image size to small (35%) in demo seed notes
This commit is contained in:
1 parent
1e56a1dca3
commit
1c9705fcd9
1 file changed
+13
@@ -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));
|
||||
|
||||
|
||||
Reference in new issue
Block a user