canMergeBothParagraphs method
Decides if we will merge the current Pr ↓ with the nextParagraph
Implementation
@override
bool canMergeBothParagraphs({
required Paragraph paragraph,
required Paragraph nextParagraph,
}) {
return paragraph.isTextInsert && nextParagraph.isTextInsert ||
(paragraph.isBlock) &&
nextParagraph.isBlock &&
mapEquality(
paragraph.blockAttributes,
nextParagraph.blockAttributes,
) ||
mergeEmbeds &&
(paragraph.isBlock) &&
nextParagraph.isBlock &&
mapEquality(
paragraph.blockAttributes,
nextParagraph.blockAttributes,
true,
);
}