async def _format_block_content(
        self, block: dict, depth: int, page_breadcrumbs: List[Breadcrumb]
    ) -> Dict[str, Any]:
        """Format a single block into markdown content."""
        block_type = block.get("type", "")
        block_content = block.get(block_type, {})

        # Delegate to specific formatters based on block type
        if block_type == "paragraph":
            content = self._extract_rich_text_markdown(block_content.get("rich_text", []))
            files = []
        elif block_type in ["heading_1", "heading_2", "heading_3"]:
            content = self._format_heading_block(block_content, block_type)
            files = []
        elif block_type in ["bulleted_list_item", "numbered_list_item", "to_do"]:
            content = self._format_list_blocks(block_content, block_type, depth)
            files = []
        elif block_type in ["quote", "callout", "code"]:
            content = self._format_text_blocks(block_content, block_type)
            files = []
        elif block_type in ["image", "video", "file", "pdf"]:
            content, files = self._format_file_block(block_content, block, block_type)
        elif block_type in ["embed", "bookmark", "equation", "divider"]:
            content = self._format_simple_blocks(block_content, block_type)
            files = []
        elif block_type in ["child_page", "child_database"]:
            content = self._format_child_blocks(block_content, block, block_type, page_breadcrumbs)
            files = []
        else:
            content = self._format_other_blocks(block_content, block_type)
            files = []

        return {"content": content, "files": files, "depth": depth}
Format a single block into markdown content.
backend/airweave/platform/sources/notion.py