Skip to content

StringExporter silently drops paragraphs between list items #65

Description

@RayBB

notion2md's StringExporter silently drops paragraph blocks that appear between bulleted_list_item or numbered_list_item blocks. Any content in those paragraphs is lost with no warning.

How to reproduce

Create a Notion page with this structure:

- Item 1
This paragraph appears between list items — will be dropped
- Item 2

Export via:

from notion2md import StringExporter

exporter = StringExporter(notion_client=client, block_id=page_id)
md = exporter.export()
# The paragraph "This paragraph appears between list items" is missing from md

Root cause

This is valid Notion API data — the API returns a flat block list where each block has a type like "paragraph" or "bulleted_list_item", and the paragraph is simply another entry in the list between the two list items. StringExporter appears to group consecutive list items and strip everything else out.

Impact

In our case, a page containing job application requirements had this structure:

- Salary range is $81k to $186k
- Interview process: 3 rounds

Both items were being dropped because they were paragraphs between list item blocks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions