diff --git a/packages/smooth_app/lib/helpers/strings_helper.dart b/packages/smooth_app/lib/helpers/strings_helper.dart index 962a0ad19cc..48f631ff09e 100644 --- a/packages/smooth_app/lib/helpers/strings_helper.dart +++ b/packages/smooth_app/lib/helpers/strings_helper.dart @@ -58,6 +58,8 @@ class TextHelper { required TextStyle? defaultStyle, required TextStyle? highlightedStyle, }) { + text = text.replaceAll(r'\n', '\n'); + final Iterable highlightedParts = RegExp('$symbol[^$symbol]+$symbol').allMatches(text); @@ -108,7 +110,6 @@ class FormattedText extends StatelessWidget { @override Widget build(BuildContext context) { final TextStyle defaultTextStyle = textStyle ?? const TextStyle(); - return RichText( text: TextSpan( style: DefaultTextStyle.of(context).style,