Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
replace: (domNode) => {
if (domNode.attribs && domNode.attribs.class === 'highlight') {
const value = find(highlights, { id: domNode.attribs.value });
return (
<strong style="{getStyles.mention(color,"> onHighlightClick(e, value)}
>
{domToReact(domNode.children)}
</strong>
);
}
if (domNode.attribs && domNode.attribs.class === 'link') {
const { value } = domNode.attribs;
return (
<a rel="noopener noreferrer" href="{value}" style="{styles.link}">
{domToReact(domNode.children)}
</a>
);
}
return domNode;
}