Skip to content

Commit

Permalink
style: keep line breaks in quoted messages
Browse files Browse the repository at this point in the history
Closes #4354.
Supersedes #4356.

The bug was introduced in 78fef8b.

Co-authored-by: Nico de Haen <[email protected]>
  • Loading branch information
WofWca and nicodh committed Nov 27, 2024
1 parent 4e730f7 commit f70f1b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- "Disappearing Messages" dialog not reflecting the actual current value #4327
- accessibility: make settings keyboard-navigable #4319
- Fix documentation for --allow-unsafe-core-replacement #4341
- fix missing linebreaks in quotes #4360

<a id="1_48_0"></a>

Expand Down
5 changes: 4 additions & 1 deletion packages/frontend/src/components/message/MessageMarkdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ function renderElementPreview(elm: ParsedElement, key?: number): JSX.Element {
return <span key={key}>{elm.c.label.map(renderElementPreview)} </span>

case 'Linebreak':
return <span key={key}>{''}</span>
// In ChatListItem this will be collapsed by default.
// We need line breaks to be displayed for quoted messages
// and in the composer.
return <span key={key}>{'\n'}</span>

case 'Tag':
case 'EmailAddress':
Expand Down

0 comments on commit f70f1b0

Please sign in to comment.