Skip to content

Commit 36cb558

Browse files
committed
Wrap “words”, not “all”
1 parent 7bdebf4 commit 36cb558

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/webapp/app/components/code/CodeBlock.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ export const CodeBlock = forwardRef<HTMLDivElement, CodeBlockProps>(
354354
<pre
355355
className={cn(
356356
"relative mr-2 p-2 font-mono text-xs leading-relaxed",
357-
isWrapped && "[&_span]:whitespace-pre-wrap [&_span]:break-all"
357+
isWrapped && "[&_span]:whitespace-pre-wrap [&_span]:break-words"
358358
)}
359359
dir="ltr"
360360
>
@@ -483,7 +483,7 @@ function HighlightCode({
483483
const preClasses = cn(
484484
"relative mr-2 font-mono leading-relaxed",
485485
preClassName,
486-
isWrapped && "[&_span]:whitespace-pre-wrap [&_span]:break-all"
486+
isWrapped && "[&_span]:whitespace-pre-wrap [&_span]:break-words"
487487
);
488488

489489
if (!isLoaded) {

0 commit comments

Comments
 (0)