Add logging for applying rule

pull/13/head
singerdmx 4 years ago
parent dc7a62d935
commit 1c64c1a3fe
  1. 1
      lib/models/documents/document.dart
  2. 1
      lib/models/rules/rule.dart

@ -139,7 +139,6 @@ class Document {
static Delta _transform(Delta delta) { static Delta _transform(Delta delta) {
Delta res = Delta(); Delta res = Delta();
for (Operation op in delta.toList()) { for (Operation op in delta.toList()) {
// TODO
res.push(op); res.push(op);
} }
return res; return res;

@ -62,6 +62,7 @@ class Rules {
delta = delta =
rule.apply(delta, index, len: len, data: data, attribute: attribute); rule.apply(delta, index, len: len, data: data, attribute: attribute);
if (delta != null) { if (delta != null) {
print("Rule $rule applied");
return delta..trim(); return delta..trim();
} }
} }

Loading…
Cancel
Save