diff --git a/src/custom/Markdown/index.tsx b/src/custom/Markdown/index.tsx index ec0f293b..92cbb5fd 100644 --- a/src/custom/Markdown/index.tsx +++ b/src/custom/Markdown/index.tsx @@ -12,6 +12,7 @@ import { StyledMarkdownH6, StyledMarkdownLi, StyledMarkdownP, + StyledMarkdownPre, StyledMarkdownTd, StyledMarkdownTh, StyledMarkdownTooltipP, @@ -51,7 +52,8 @@ export const RenderMarkdown: React.FC = ({ content }) => { ul: ({ ...props }) => {props.children}, li: ({ ...props }) => {props.children}, th: ({ ...props }) => {props.children}, - td: ({ ...props }) => {props.children} + td: ({ ...props }) => {props.children}, + pre: ({ ...props }) => {props.children} }} > {content} diff --git a/src/custom/Markdown/style.tsx b/src/custom/Markdown/style.tsx index 127d45cb..9140d9e8 100644 --- a/src/custom/Markdown/style.tsx +++ b/src/custom/Markdown/style.tsx @@ -71,3 +71,8 @@ export const StyledMarkdownTd = styled('td')(({ theme }) => ({ marginBlock: '0px', ...theme.typography.textB1Regular })); + +export const StyledMarkdownPre = styled('pre')(({ theme }) => ({ + background: theme.palette.background.code, + whiteSpace: 'pre-line' +}));