PreserveBlockStyleOnInsertRule supports unchecked list

pull/541/head
X Code 3 years ago
parent 25980df3fb
commit 567315a5a2
  1. 5
      lib/src/models/rules/insert.dart

@ -100,6 +100,11 @@ class PreserveBlockStyleOnInsertRule extends InsertRule {
resetStyle.addAll(Attribute.checked.toJson());
}
// Similarly for the unchecked style
if (lineStyle.attributes[Attribute.list.key] == Attribute.unchecked) {
resetStyle.addAll(Attribute.unchecked.toJson());
}
// Go over each inserted line and ensure block style is applied.
final lines = data.split('\n');
final delta = Delta()..retain(index + (len ?? 0));

Loading…
Cancel
Save