quill
quill copied to clipboard
MatchNewLine matcher condition updated to check for empty delta object
fixes: #3812
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.
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.
Looks like the unit tests fail. You can check them locally with npm run test:unit -w quill.
Looks like the unit tests fail. You can check them locally with
npm run test:unit -w quill.
yes, checking
updated @luin looks like to test the same we need extra \n in text string.
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 :pray: