fix: removed regexp on startWith

pull/2028/head
CatHood0 9 months ago
parent c3327dad79
commit baa4df04d4
  1. 3
      lib/src/models/rules/insert.dart

@ -570,8 +570,7 @@ class PreserveInlineStylesRule extends InsertRule {
final currLine = itr.next();
final currData =
currLine.data is String ? currLine.data as String : null;
if (currData != null &&
(currData.isEmpty || currData.startsWith(RegExp('^\n')))) {
if (currData?.isEmpty == true || currData?.startsWith('\n') == true) {
if (prevData.trimRight().isEmpty) {
final back =
DeltaIterator(documentDelta).skip(index - prevData.length);

Loading…
Cancel
Save