chore: fix newline rendering in non-HTML formatted messages (#2131)
This commit is contained in:
parent
26638c824b
commit
6df46c73a1
1 changed files with 8 additions and 1 deletions
|
|
@ -234,6 +234,10 @@ class MessageTextWidget extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
|
||||
if (tokenPosition.token?.pos == 'SPACE') {
|
||||
return const TextSpan(text: '\n');
|
||||
}
|
||||
|
||||
if (tokenPosition.token != null) {
|
||||
// if the tokenPosition is a combination of the token and preceding / following punctuation
|
||||
// split them so that only the token itself is highlighted when clicked
|
||||
|
|
@ -280,7 +284,10 @@ class MessageTextWidget extends StatelessWidget {
|
|||
onTap: onClick != null
|
||||
? () => onClick?.call(tokenPosition)
|
||||
: null,
|
||||
child: HiddenText(text: middle, style: style),
|
||||
child: HiddenText(
|
||||
text: middle,
|
||||
style: style,
|
||||
),
|
||||
),
|
||||
)
|
||||
: LinkifySpan(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue