Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
link: {
...defaultRules.link,
react: (node, output, state) => (
<a rel="noopener noreferrer nofollow ugc" title="{node.title}" href="{node.target}">
{output(node.content, state)}
</a>
),
},
autolink: {
...defaultRules.autolink,
match: anyScopeRegex(/^<(https?:\/\/[^ >]+)>/),
},
url: defaultRules.url,
strong: defaultRules.strong,
em: defaultRules.em,
underline: defaultRules.u,
inlineCode: {
...defaultRules.inlineCode,
react: (node, _, state) => <code>{node.content}</code>,
},
shrug: {
// Edge case for shrug emoji getting parsed as markup.
order: defaultRules.text.order,
match: inlineRegex(/^¯\\_\(ツ\)_\/¯/),
parse: capture => ({
type: "text",