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

Desktop,Mobile: Fix list renumbering in the Markdown editor resets the first list item number to 1 #11220

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

personalizedrefrigerator
Copy link
Collaborator

Summary

This pull request fixes a bug originally reported on the forum.

Markdown lists can start on numbers greater than 1. However, the "indent" button on mobile and tab on desktop (which renumber list items when indenting a numbered list) reset the first list item to 1.

Behavior comparison

Original note:

2. This
3. is
4. a
5. test

Old output: After pressing "indent" for the second item:

1. This
	1. is
2. a
3. test

New output: After pressing "indent" for the second item:

2. This
	1. is
3. a
4. test

Testing plan

This pull request includes an automated test.

Additionally, this has been tested with the desktop app by:

  1. Creating a note with the following content:
    2. This
    3. is
    4. a
    4. test
    
  2. Moving the cursor to the line starting with 3..
  3. Pressing tab.
  4. Verifying that the note now has the following content:
    2. This
    	1. is
    3. a
    4. test
    

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

Successfully merging this pull request may close these issues.

1 participant