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

Make numbered list regex more strict #202

Merged

Conversation

eoineoineoin
Copy link

The regexps used for identifying numbered lists were not strict enough, causing non-list lines to be identified as lists.

More information is on nextcloud/notes-android#1848 - this PR fixes the described bug.

@stefan-niedermann
Copy link
Owner

Great contribution, thank you!

Would you mind adding a unit test to prevent regressions in future releases?

@eoineoineoin
Copy link
Author

eoineoineoin commented Jul 22, 2023

Sure thing! I've added those tests; maybe more than necessary, but wanted to check all the combinations of whitespace and non-numerals. Not like these take a long time to run, but let me know if it's not what you expected.

Tests fail on 1.8.1 branch and pass with this PR.

@stefan-niedermann stefan-niedermann merged commit b54bc75 into stefan-niedermann:master Jul 22, 2023
3 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.

2 participants