Quellcode durchsuchen

fix insert exclude highlight

lucky1213 vor 5 Jahren
Ursprung
Commit
f26ac07b38
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4
    0
      packages/notus/lib/src/heuristics/insert_rules.dart

+ 4
- 0
packages/notus/lib/src/heuristics/insert_rules.dart Datei anzeigen

158
     final attributes = previous.attributes;
158
     final attributes = previous.attributes;
159
     final hasLink =
159
     final hasLink =
160
         (attributes != null && attributes.containsKey(NotusAttribute.link.key));
160
         (attributes != null && attributes.containsKey(NotusAttribute.link.key));
161
+    final hasHighLight = (attributes != null && attributes.containsKey(NotusAttribute.highlight.key));
162
+    if (hasHighLight) {
163
+      attributes.remove(NotusAttribute.highlight.key);
164
+    }
161
     if (!hasLink) {
165
     if (!hasLink) {
162
       return Delta()
166
       return Delta()
163
         ..retain(index)
167
         ..retain(index)