Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions frontend/src/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ export function PreCode(props: JSX.IntrinsicElements["pre"]) {
)}
</Button>
</div>
<pre ref={ref}>{props.children}</pre>
<pre ref={ref} style={{ overflowWrap: "break-word", wordBreak: "break-word" }}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Mixing overflowWrap and wordBreak with same value is redundant. wordBreak: break-word alone is sufficient.

{props.children}
</pre>
</>
);
}
Expand Down Expand Up @@ -404,7 +406,9 @@ export function Markdown(
className="markdown-body"
style={{
fontSize: `${props.fontSize ?? 16}px`,
fontFamily: props.fontFamily || "inherit"
fontFamily: props.fontFamily || "inherit",
overflowWrap: "break-word",
wordBreak: "break-word"
}}
ref={mdRef}
onContextMenu={props.onContextMenu}
Expand Down
Loading