diff --git a/frontend/app/element/markdown.tsx b/frontend/app/element/markdown.tsx index b592252be..b9d7d8c9c 100644 --- a/frontend/app/element/markdown.tsx +++ b/frontend/app/element/markdown.tsx @@ -39,10 +39,10 @@ const Link = ({ ); }; -const Heading = ({ id, children, hnum }: { id?: string; children: React.ReactNode; hnum: number }) => { +const Heading = ({ props, hnum }: { props: React.HTMLAttributes; hnum: number }) => { return ( -
- {children} +
+ {props.children}
); }; @@ -197,24 +197,12 @@ const Markdown = ({ text, textAtom, showTocAtom, style, className, resolveOpts, a: (props: React.HTMLAttributes) => ( ), - h1: (props: React.HTMLAttributes) => ( - - ), - h2: (props: React.HTMLAttributes) => ( - - ), - h3: (props: React.HTMLAttributes) => ( - - ), - h4: (props: React.HTMLAttributes) => ( - - ), - h5: (props: React.HTMLAttributes) => ( - - ), - h6: (props: React.HTMLAttributes) => ( - - ), + h1: (props: React.HTMLAttributes) => , + h2: (props: React.HTMLAttributes) => , + h3: (props: React.HTMLAttributes) => , + h4: (props: React.HTMLAttributes) => , + h5: (props: React.HTMLAttributes) => , + h6: (props: React.HTMLAttributes) => , img: (props: React.HTMLAttributes) => , source: (props: React.HTMLAttributes) => , code: Code, @@ -251,7 +239,7 @@ const Markdown = ({ text, textAtom, showTocAtom, style, className, resolveOpts, > rehypeSlug({ prefix: idPrefix })]} components={markdownComponents} > {text}