2
0

📝 Add "best marketing chatgpt prompts" blog post (#1543)

Co-authored-by: Baptiste Arnaud <baptiste.arnaud95@gmail.com>
This commit is contained in:
younesbenallal
2024-06-04 17:27:02 +02:00
committed by GitHub
parent d363b23efa
commit edbc5a0cef
13 changed files with 660 additions and 2 deletions

View File

@@ -50,9 +50,14 @@ export const Post = ({ metadata, mdxSource }: Props) => (
h5: (props) => <Heading as="h5" fontSize="lg" {...props} />,
h6: (props) => <Heading as="h6" fontSize="md" {...props} />,
code: ({ children, ...props }) => {
const codeHTML = highlight(children?.toString() ?? '')
if (!props.className || props.className?.includes('md'))
return <code {...props}>{children}</code>
const hightlightedCode = highlight(children?.toString() ?? '')
return (
<code dangerouslySetInnerHTML={{ __html: codeHTML }} {...props} />
<code
dangerouslySetInnerHTML={{ __html: hightlightedCode }}
{...props}
/>
)
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any