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

MatchNewLine matcher condition updated to check for empty delta object #3996

Closed

Conversation

Shubhdeep12
Copy link

fixes: #3812

@luin
Copy link
Member

luin commented Feb 4, 2024

Thanks for the contribution! strong and i are block level elements so we should not return true for them. I don't think it's the root cause for the bug.

@Shubhdeep12
Copy link
Author

Makes sense @luin ,

I have updated the condition for the matchNewline matcher.

Reason: If an empty delta is coming for the matchNewLine matcher, it implies that there is something in the input that added this empty delta. Therefore, we should not restrict the matchNewLine condition to check only for deltas with a length greater than 0. It should also check for empty deltas.

@Shubhdeep12 Shubhdeep12 changed the title Added strong and italic tag in isline elements list MatchNewLine matcher condition updated to check for empty delta object Feb 4, 2024
@luin
Copy link
Member

luin commented Feb 4, 2024

Looks like the unit tests fail. You can check them locally with npm run test:unit -w quill.

@Shubhdeep12
Copy link
Author

Looks like the unit tests fail. You can check them locally with npm run test:unit -w quill.

yes, checking

@Shubhdeep12
Copy link
Author

updated @luin looks like to test the same we need extra \n in text string.

@quill-bot
Copy link

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏

@quill-bot quill-bot closed this Apr 18, 2024
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.

Pasting HTML with Strong and List Separated by Newline Places the Strong Content within the List
3 participants