diff --git a/frontend/src/components/markdown.tsx b/frontend/src/components/markdown.tsx index 67058d6b..a697d2ae 100644 --- a/frontend/src/components/markdown.tsx +++ b/frontend/src/components/markdown.tsx @@ -235,6 +235,20 @@ function CustomCode(props: JSX.IntrinsicElements["code"]) { return {props.children}; } +function ResponsiveTable({ children, className, ...rest }: JSX.IntrinsicElements["table"]) { + // Strip off props added by react-markdown that the DOM doesn't understand + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { node, inline, ...safeRest } = rest as Record; + + return ( +
+ + {children} +
+
+ ); +} + function escapeDollarNumber(text: string) { let escapedText = ""; @@ -305,6 +319,7 @@ function MarkDownContentToMemo(props: { content: string }) { components={{ pre: (props: JSX.IntrinsicElements["pre"]) => , code: (props: JSX.IntrinsicElements["code"]) => , + table: (props: JSX.IntrinsicElements["table"]) => , p: (pProps) =>

, a: (aProps) => { const href = aProps.href || "";