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

Mobile,Desktop: Fixes #11135: Fix incorrect list switching behavior #11137

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Sep 27, 2024

Summary

This pull request fixes incorrect regular expressions for numbered lists and checklists.

Previously, the numbered and checklist regular expressions did not require a space after the first number (so "1.a" would be considered a list item).

Fixes #11135.

Screen recording

Screencast.from.2024-09-27.12-23-17.webm

Possible future improvements

  1. Use CodeMirror's syntax tree to determine whether a list type is already selected, rather than using a custom regular expression.
    • This may lead to more fragile tests — in the past there have been random CI failures due to the CodeMirror syntax tree not being present.
  2. Don't try to remove a list if: 1) the user has selected text and 2) the text seems to be only part of a larger list.

Testing plan

This pull request includes an automated test.

@laurent22
Copy link
Owner

That looks good, thank you for fixing this!

@laurent22 laurent22 merged commit 948ca60 into laurent22:dev Sep 27, 2024
10 checks passed
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.

Beta editor deletes numbers when editing lists
2 participants