diff --git a/src/components/ProposalDetails.js b/src/components/ProposalDetails.js index 6e43765f..d3273ab6 100644 --- a/src/components/ProposalDetails.js +++ b/src/components/ProposalDetails.js @@ -27,6 +27,11 @@ function ProposalDetails(props) { const fixDescription = description?.replace(/\\n/g, ' \n') + const parsedDescription = parse( + micromark(fixDescription, { extensions: [gfm()], htmlExtensions: [gfmHtml()] }), + { replace: transformElement } + ); + const transformElement = (node) => { if (proposal.isSpam && node.name === 'a') { return {node.children[0].data}; @@ -196,7 +201,7 @@ function ProposalDetails(props) {
{title}
- {parse(micromark(fixDescription, {extensions: [gfm()], htmlExtensions: [gfmHtml()]}), { replace: transformElement})} + {parsedDescription}