From 8c91219134fce010ac0854c5e31cee4b190cd0f2 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Tue, 17 Sep 2024 17:02:58 +0200 Subject: [PATCH] style(markdown): render headers as paragraphs --- src/components/markdown/markdown.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/markdown/markdown.tsx b/src/components/markdown/markdown.tsx index 8ba27587..6fc19b21 100644 --- a/src/components/markdown/markdown.tsx +++ b/src/components/markdown/markdown.tsx @@ -167,11 +167,16 @@ const Markdown = ({ content, title }: MarkdownProps) => { rehypePlugins={[[rehypeSanitize, customSchema]]} components={{ p: ({ children }) =>

{children}

, + h1: ({ children }) =>

{children}

, + h2: ({ children }) =>

{children}

, + h3: ({ children }) =>

{children}

, + h4: ({ children }) =>

{children}

, + h5: ({ children }) =>

{children}

, + h6: ({ children }) =>

{children}

, img: ({ src }) => {src}, video: ({ src }) => {src}, iframe: ({ src }) => {src}, source: ({ src }) => {src}, - hr: () => null, a: ({ href, children }) => { if (href && !isInCatalogView) { const linkMediaInfo = getLinkMediaInfo(href);