Skip to content

Commit

Permalink
Add overflow-x-auto for code block
Browse files Browse the repository at this point in the history
  • Loading branch information
mengqi92 committed Mar 31, 2024
1 parent 066c3b1 commit 949350e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/_components/markdown-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const components: MDXComponents = {
li: ({ children }) => <li className="leading-7 list-outside list-decimal">{children}</li>,
pre: ({ className, children, ...props }) => {
return (
<pre className={clsx("p-0 my-4 px-4 py-4 bg-transparent rounded", className)} {...props}>
<pre className={clsx("p-0 my-4 px-4 py-4 bg-transparent rounded overflow-x-auto", className)} {...props}>
{children}
</pre>
)
Expand Down

0 comments on commit 949350e

Please sign in to comment.