|
|
@ -53,7 +53,7 @@ class PreserveLineStyleOnMergeRule extends DeleteRule { |
|
|
|
op = itr.next(); |
|
|
|
op = itr.next(); |
|
|
|
String text = op.data is String ? op.data as String : ''; |
|
|
|
String text = op.data is String ? op.data as String : ''; |
|
|
|
int lineBreak = text.indexOf('\n'); |
|
|
|
int lineBreak = text.indexOf('\n'); |
|
|
|
if (lineBreak < 0) { |
|
|
|
if (lineBreak == -1) { |
|
|
|
delta..retain(op.length); |
|
|
|
delta..retain(op.length); |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
@ -68,6 +68,7 @@ class PreserveLineStyleOnMergeRule extends DeleteRule { |
|
|
|
attributes.addAll(attrs); |
|
|
|
attributes.addAll(attrs); |
|
|
|
} |
|
|
|
} |
|
|
|
delta..retain(lineBreak)..retain(1, attributes); |
|
|
|
delta..retain(lineBreak)..retain(1, attributes); |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
return delta; |
|
|
|
return delta; |
|
|
|
} |
|
|
|
} |
|
|
|