Skip to content

Commit

Permalink
fix markdown overflow when render long code (#1640)
Browse files Browse the repository at this point in the history
* fix markdown overflow when render long code

* remove unneeded style
  • Loading branch information
notmd committed Feb 16, 2023
1 parent 4cdd4bb commit 92a5210
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion website/src/components/Messages/RenderedMarkdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const components = {
};

const sx: SystemStyleObject = {
overflowX: "auto",
pre: {
bg: "transparent",
},
Expand All @@ -43,12 +44,12 @@ const sx: SystemStyleObject = {
},
"p:only-child": {
my: 0, // ovoid margin when markdown only render 1 p tag
mt: { base: 1.5, md: 0 },
},
p: {
whiteSpace: "pre-wrap",
display: "inline-block",
},
display: "inline-block",
wordBreak: "break-word",
"> blockquote": {
borderInlineStartColor: "gray.300",
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/api/messages/[id]/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default withoutRole("banned", async (req, res, token) => {
const isModOrAdmin = token.role === ROLES.ADMIN || token.role === ROLES.MODERATOR;
const response = await client.fetch_message_tree(messageId, {
include_deleted: isModOrAdmin,
include_spam: isModOrAdmin,
include_spam: true,
});

if (!response) {
Expand Down

0 comments on commit 92a5210

Please sign in to comment.