Skip to content

Commit ecb929a

Browse files
authored
fix: long link text overflows (#139)
1 parent d583b1f commit ecb929a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/streamdown/__tests__/components.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ describe("Markdown Components", () => {
119119
);
120120
const link = container.querySelector("a");
121121
expect(link).toBeTruthy();
122+
expect(link?.className).toContain("wrap-anywhere");
122123
expect(link?.className).toContain("font-medium");
123124
expect(link?.className).toContain("text-primary");
124125
expect(link?.className).toContain("underline");

packages/streamdown/lib/components.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ export const components: Options["components"] = {
146146

147147
return (
148148
<a
149-
className={cn("font-medium text-primary underline", className)}
149+
className={cn(
150+
"wrap-anywhere font-medium text-primary underline",
151+
className
152+
)}
150153
data-incomplete={isIncomplete}
151154
data-streamdown="link"
152155
href={href}

0 commit comments

Comments
 (0)