Adjust the sequence of splinted list #2928
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When pressing the Enter key to split the list into two, the numbering of the subsequent list block was incorrect. To maintain the correct sequence, the code was refactored to properly count the list item numbers.
Before:
![BuggedListSequence](https://private-user-images.githubusercontent.com/87443959/405684101-25403ae0-33fb-430b-ba98-6f1e6b45e1ce.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5ODE1NzksIm5iZiI6MTczODk4MTI3OSwicGF0aCI6Ii84NzQ0Mzk1OS80MDU2ODQxMDEtMjU0MDNhZTAtMzNmYi00MzBiLWJhOTgtNmYxZTZiNDVlMWNlLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAyMjExOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgxOWY3ZDk0YmJlZDY5ZjUzMjQ0NzgwY2VmNTJhOGIxOGIyZTdkZDQ1Y2U3MWIxYjlmNTg5YzIyNTRlZThiZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.egs7PsDHVpAfw4XI1dlsqeGy_lL8AhQ8hDE1vZhZ7ec)
After:
![FixedListSequence](https://private-user-images.githubusercontent.com/87443959/405684158-623b260d-2a83-4883-8375-b2bf2c0e3173.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5ODE1NzksIm5iZiI6MTczODk4MTI3OSwicGF0aCI6Ii84NzQ0Mzk1OS80MDU2ODQxNTgtNjIzYjI2MGQtMmE4My00ODgzLTgzNzUtYjJiZjJjMGUzMTczLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAyMjExOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMyODQ2N2U0ZjQwNGIwMjAzYjY2NDM0NTc3ZTU0NjlhMGQxYjlmYzdkNTJlOTI0ODc1MWJiYzQ5ZDlkMTg1M2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Et5YVkh5aGuWDhdCx6A6SKADYUOYMTh_nni9gCdaRbc)