Skip to content

Commit

Permalink
fix: Long katex strings breaking overflow in x axis (#32609)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchoeler authored Jun 17, 2024
1 parent 9795e58 commit 59df102
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/healthy-clouds-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/gazzodown": patch
---

Fixes long katex lines overflowing the message component
2 changes: 1 addition & 1 deletion packages/gazzodown/src/katex/KatexBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const KatexBlock = ({ code }: KatexBlockProps): ReactElement => {
[code],
);

return <div role='math' aria-label={code} dangerouslySetInnerHTML={{ __html: html }} />;
return <div role='math' style={{ overflowX: 'auto' }} aria-label={code} dangerouslySetInnerHTML={{ __html: html }} />;
};

export default KatexBlock;

0 comments on commit 59df102

Please sign in to comment.