From 1586bc94298df0d85f9e921845f93ed0ac4b1e90 Mon Sep 17 00:00:00 2001 From: PonyCui Date: Tue, 4 Aug 2020 10:05:24 +0800 Subject: [PATCH] fix: The blockquote content new-line letter should not be replaced. (#250) --- packages/flutter_markdown/lib/src/builder.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flutter_markdown/lib/src/builder.dart b/packages/flutter_markdown/lib/src/builder.dart index 05e5437594..93cad4e2c5 100644 --- a/packages/flutter_markdown/lib/src/builder.dart +++ b/packages/flutter_markdown/lib/src/builder.dart @@ -233,7 +233,9 @@ class MarkdownBuilder implements md.NodeVisitor { style: _isInBlockquote ? _inlines.last.style.merge(styleSheet.blockquote) : _inlines.last.style, - text: text.text.replaceAll(RegExp(r" ?\n"), " "), + text: _isInBlockquote + ? text.text + : text.text.replaceAll(RegExp(r" ?\n"), " "), recognizer: _linkHandlers.isNotEmpty ? _linkHandlers.last : null, ), textAlign: _textAlignForBlockTag(_currentBlockTag),