applyRule method
Applies heuristic rule to an operation on a document
and returns
resulting Delta.
Implementation
@override
Delta applyRule(Document document, int index,
{int? len, Object? data, Attribute? attribute}) {
final itr = DeltaIterator(document.toDelta())..skip(index + len!);
return Delta()
..retain(index)
..delete(itr.hasNext ? len : len - 1);
}