MCPcopy Create free account
hub / github.com/block/buzz / isImageOnlyParagraph

Function isImageOnlyParagraph

desktop/src/shared/ui/markdownUtils.ts:51–54  ·  view source on GitHub ↗
(childArray: React.ReactNode[])

Source from the content-addressed store, hash-verified

49
50/** Returns true when a paragraph contains 2+ images and no other content. */
51export function isImageOnlyParagraph(childArray: React.ReactNode[]): boolean {
52 const { imageChildren, nonImageChildren } = classifyChildren(childArray);
53 return imageChildren.length >= 2 && nonImageChildren.length === 0;
54}
55
56/**
57 * Returns true when a paragraph contains any image/video child. The custom

Callers 1

createMarkdownComponentsFunction · 0.90

Calls 1

classifyChildrenFunction · 0.70

Tested by

no test coverage detected