Skip to content

Commit

Permalink
fix: fix to avoid StarSearch UI breaking when long words are outputted (
Browse files Browse the repository at this point in the history
  • Loading branch information
nickytonline committed May 17, 2024
1 parent f95163d commit 4d6bb23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pages/star-search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,9 @@ function Chatbox({ message, userId }: { message: StarSearchChat; userId?: number
let content;

if (typeof message.content == "string") {
content = <Markdown>{message.content}</Markdown>;
// Breaking all words so that the rendered markdown doesn't overflow the container
// in certain cases where the content is a long string.
content = <Markdown className="break-all">{message.content}</Markdown>;
} else {
if (!componentRegistry.has(message.content.name)) {
return null;
Expand Down

0 comments on commit 4d6bb23

Please sign in to comment.