Skip to content

Improve logic that determines ordered list count #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2020

Conversation

timolins
Copy link
Member

Notion has a weird way of handling top-level lists. To determine the correct number for each list item, we group all successive blocks with the same type together. This way we have separate groups of all lists, which we can use to lookup the index of the corresponding block.

Closes #4 (again)

Group all "chains" of all blocks with the same type.
Then look-up the block id in the given chain.
@timolins timolins requested a review from tobiaslins May 24, 2020 19:44
@tobiaslins tobiaslins merged commit a6e2ece into master May 25, 2020
@kartiknair
Copy link

Just tested it & everything works perfectly. Thank you so much for quickly dealing with the issue!

@timolins timolins deleted the fix-ordered-list-calculation branch July 6, 2020 08:06
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.

Numbered lists aren't working
3 participants