Skip to content

Commit

Permalink
fix: Guide: Rewrite newline character from translations (#5365)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k authored Jun 13, 2024
1 parent 08071d2 commit f5973da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/smooth_app/lib/helpers/strings_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class TextHelper {
required TextStyle? defaultStyle,
required TextStyle? highlightedStyle,
}) {
text = text.replaceAll(r'\n', '\n');

final Iterable<RegExpMatch> highlightedParts =
RegExp('$symbol[^$symbol]+$symbol').allMatches(text);

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f5973da

Please sign in to comment.