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: AutoExitBlockRule should escape indented blocks #447

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

Conversation

ChizobaAmadi
Copy link

Why

AutoExitBlockRule unsets a block when the when the user enters two consecutive new line characters. This works for a single-level list but is not consistent with the behaviour of other editors for multi-level list. For example, the default IOS notes app unindents all blocks consecutively when new lines are inserted.

What

  • Update the AutoExitBlockRule to check if we are in a nested level before and unindent else unset the block.

Testing

  • Added a new test case to verify the new behaviour
  • Tested by running the example app

@ChizobaAmadi ChizobaAmadi changed the title Fix: AutoExitBlockRule should unindent nested block Fix: AutoExitBlockRule should unindent indented blocks Jan 3, 2025
@ChizobaAmadi ChizobaAmadi changed the title Fix: AutoExitBlockRule should unindent indented blocks Fix: AutoExitBlockRule should escape indented blocks Jan 3, 2025
Copy link
Member

@Amir-P Amir-P left a comment

Choose a reason for hiding this comment

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

Hey @ChizobaAmadi , Thanks for contributing to Fleather!

Looks like you've based this branch on the fix/multi_level_different_list_type and brought those changes here too. Can you please fix that so that we can only review the changes regarding AutoExitBlockRule?

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