Skip to content

Commit 92a5210

Browse files
authored
fix markdown overflow when render long code (#1640)
* fix markdown overflow when render long code * remove unneeded style
1 parent 4cdd4bb commit 92a5210

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

website/src/components/Messages/RenderedMarkdown.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const components = {
2727
};
2828

2929
const sx: SystemStyleObject = {
30+
overflowX: "auto",
3031
pre: {
3132
bg: "transparent",
3233
},
@@ -43,12 +44,12 @@ const sx: SystemStyleObject = {
4344
},
4445
"p:only-child": {
4546
my: 0, // ovoid margin when markdown only render 1 p tag
47+
mt: { base: 1.5, md: 0 },
4648
},
4749
p: {
4850
whiteSpace: "pre-wrap",
4951
display: "inline-block",
5052
},
51-
display: "inline-block",
5253
wordBreak: "break-word",
5354
"> blockquote": {
5455
borderInlineStartColor: "gray.300",

website/src/pages/api/messages/[id]/tree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default withoutRole("banned", async (req, res, token) => {
99
const isModOrAdmin = token.role === ROLES.ADMIN || token.role === ROLES.MODERATOR;
1010
const response = await client.fetch_message_tree(messageId, {
1111
include_deleted: isModOrAdmin,
12-
include_spam: isModOrAdmin,
12+
include_spam: true,
1313
});
1414

1515
if (!response) {

0 commit comments

Comments
 (0)