Skip to content
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

fix: editor crashes when multi level list uses different list types #446

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ChizobaAmadi
Copy link

@ChizobaAmadi ChizobaAmadi commented Jan 3, 2025

Why

When the list type of a multi level list is switched the editor crashes. For example, given the following list with 2 levels:

  1. Ordered 1 [level 1]
    • Unordered 1 [level 2]
  2. Ordered 2 [level 1]

If "1. " is changed to an unordered list, the editor crashes with a null pointer exception because it expects each list level to use the same type.

What Changed

When looking for the next index number to apply for a numbered list check if the current level has an entry.

Testing

Added a new multi-level numbered list test

@ChizobaAmadi ChizobaAmadi changed the title fix: editor crashed when multi level list uses different types fix: editor crashes when multi level list uses different types Jan 3, 2025
@ChizobaAmadi ChizobaAmadi changed the title fix: editor crashes when multi level list uses different types fix: editor crashes when multi level list uses different list types Jan 3, 2025
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.

1 participant