Skip to content

Commit

Permalink
fix(note-viewer): preserve line breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinTh committed Sep 29, 2024
1 parent fa7b667 commit 479e56b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export const ViewNotePage: Component = () => {

<div class="mx-auto max-w-1200px px-6 mt-6 flex gap-4 md:flex-row-reverse flex-col justify-center min-w-0">
{getDecryptedNote() && (
<div class="flex-1 mb-4">
<div class="flex-1 mb-4 min-w-0">
<div class="flex items-center gap-2 mb-4 justify-between">
<div class="text-muted-foreground">
{t('view.note-content')}
Expand All @@ -269,8 +269,10 @@ export const ViewNotePage: Component = () => {
</div>

<Card class="w-full rounded-md shadow-sm mb-2">
<CardContent class="p-6">
<div class="break-all" data-test-id="note-content-display">{getDecryptedNote()}</div>
<CardContent class="p-6 overflow-x-auto max-w-100%">
<pre data-test-id="note-content-display">
{getDecryptedNote()}
</pre>
</CardContent>
</Card>

Expand Down

0 comments on commit 479e56b

Please sign in to comment.