We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9423a81 commit 9867e39Copy full SHA for 9867e39
lib/rich_text_parser.dart
@@ -632,7 +632,8 @@ class HtmlRichTextParser extends StatelessWidget {
632
else if (parseContext.parentElement is TextSpan ||
633
parseContext.parentElement is LinkTextSpan) {
634
String lastString = parseContext.parentElement.text ?? '';
635
- if (!parseContext.parentElement.children.isEmpty) {
+ if (!parseContext.parentElement.children.isEmpty &&
636
+ parseContext.parentElement.children.last is TextSpan) {
637
lastString = parseContext.parentElement.children.last.text ?? '';
638
}
639
if (lastString.endsWith(' ') || lastString.endsWith('\n')) {
0 commit comments