quill icon indicating copy to clipboard operation
quill copied to clipboard

MatchNewLine matcher condition updated to check for empty delta object

Open Shubhdeep12 opened this issue 1 year ago • 5 comments
trafficstars

fixes: #3812

Shubhdeep12 avatar Feb 03 '24 15:02 Shubhdeep12

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.

luin avatar Feb 04 '24 00:02 luin

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 avatar Feb 04 '24 08:02 Shubhdeep12

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

luin avatar Feb 04 '24 08:02 luin

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

yes, checking

Shubhdeep12 avatar Feb 04 '24 08:02 Shubhdeep12

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

Shubhdeep12 avatar Feb 04 '24 09:02 Shubhdeep12

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:

quill-bot avatar Apr 18 '24 01:04 quill-bot