diff --git a/lib/src/models/documents/nodes/line.dart b/lib/src/models/documents/nodes/line.dart index eb6a1744..75dfbde0 100644 --- a/lib/src/models/documents/nodes/line.dart +++ b/lib/src/models/documents/nodes/line.dart @@ -317,13 +317,13 @@ base class Line extends Container { void _insertSafe(int index, Object data, Style? style) { assert(index == 0 || (index > 0 && index < length)); - var inlineStyles = style; - if (style != null) { - final nonInlineStyles = - style.attributes.values.where((v) => !v.isInline).toSet(); - final styleToApply = style.removeAll(nonInlineStyles); - inlineStyles = styleToApply; - } + // var inlineStyles = style; + // if (style != null) { + // final nonInlineStyles = + // style.attributes.values.where((v) => !v.isInline).toSet(); + // final styleToApply = style.removeAll(nonInlineStyles); + // inlineStyles = styleToApply; + // } if (data is String) { assert(!data.contains('\n')); @@ -335,10 +335,10 @@ base class Line extends Container { if (isEmpty) { final child = Leaf(data); add(child); - child.format(inlineStyles); + child.format(style); } else { final result = queryChild(index, true); - result.node!.insert(result.offset, data, inlineStyles); + result.node!.insert(result.offset, data, style); } }