Skip to content

Conversation

gadelkareem
Copy link

No description provided.

Copy link
Owner

@trustmaster trustmaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware of the children limit, so thanks for bringing it up.

Unfortunately the current implementation breaks all bulleted and numbered lists as those need to have items as separate Notion blocks.

Could you consider merging similar text blocks together after parsing the blocks?

@gadelkareem
Copy link
Author

I limited merging the blocks only to text types

Copy link
Owner

@trustmaster trustmaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a tiny bug in the latest revision.

Also, after playing a bit more with this behaviour, I think that merging paragraphs to bypass the block count limitation should rather be a config option, e.g.:

[notion]
merge_paragraphs=False

because the native behaviour to Notion is to have each paragraph as a separate block. Merging all paragraphs in one block by default makes editing less convenient.

@gadelkareem
Copy link
Author

Added!

Copy link
Owner

@trustmaster trustmaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs just one last touch, adding the option to the Config object at line 183:

        self.merge_paragraphs = ini['notion']['merge_paragraphs'].lower(
        ) == 'true'

with that change in place everything works like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants