From a3a8215b4cfdc8d120fec9d5278260a5aef02ec0 Mon Sep 17 00:00:00 2001 From: X Code Date: Wed, 2 Mar 2022 15:21:27 -0800 Subject: [PATCH] Upgrade to 4.0.7 --- CHANGELOG.md | 3 +++ lib/src/models/documents/nodes/line.dart | 3 +-- lib/src/widgets/raw_editor.dart | 3 +-- pubspec.yaml | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b84b71d1..545bbec0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [4.0.7] +* Refactor getPlainText (better handling of blank lines and lines with multiple markups. + # [4.0.6] * Bug fix for copying text with new lines. diff --git a/lib/src/models/documents/nodes/line.dart b/lib/src/models/documents/nodes/line.dart index 35f70dda..4222c9b7 100644 --- a/lib/src/models/documents/nodes/line.dart +++ b/lib/src/models/documents/nodes/line.dart @@ -486,8 +486,7 @@ class Line extends Container { // blank line plainText.write('\n'); _len -= 1; - } - else { + } else { _len = _getNodeText(node, plainText, offset, _len); while (!node!.isLast && _len > 0) { diff --git a/lib/src/widgets/raw_editor.dart b/lib/src/widgets/raw_editor.dart index 3ef2cf73..d8503492 100644 --- a/lib/src/widgets/raw_editor.dart +++ b/lib/src/widgets/raw_editor.dart @@ -987,8 +987,7 @@ class RawEditorState extends EditorState try { // ignore exception when paste window is at end of document bringIntoView(textEditingValue.selection.extent); - } - catch(_){}; + } catch (_) {} hideToolbar(); } } diff --git a/pubspec.yaml b/pubspec.yaml index 22355409..b05679b7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 4.0.6 +version: 4.0.7 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill