Sfoglia il codice sorgente

fix insert exclude highlight

lucky1213 5 anni fa
parent
commit
f26ac07b38
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4
    0
      packages/notus/lib/src/heuristics/insert_rules.dart

+ 4
- 0
packages/notus/lib/src/heuristics/insert_rules.dart Vedi File

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)