map h to p

This commit is contained in:
Chris Waring 2020-11-20 19:30:29 +00:00
parent 2a7b68cd65
commit f6395086c2
No known key found for this signature in database
GPG Key ID: 4D2E767CC8B1C083

View File

@ -89,6 +89,12 @@ const Link = ({ href, children, dark }) => {
export const ProcessedText = ({ text, dark }) => {
const remarkReactComponents = {
h1: P,
h2: P,
h3: P,
h4: P,
h5: P,
h6: P,
a: (props) => <Link dark={dark} {...props} />,
};
return <Markdown md={text} options={{ remarkReactComponents }} />;