Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
big={node.jumboable}
key={state.key}
/>
),
},
text: {
...defaultRules.text,
parse: (capture, parse, state) =>
state.nested
? {
content: capture[0],
}
: parse(convertEmojiToNames(capture[0]), { ...state, nested: true }),
},
del: {
...defaultRules.del,
match: inlineRegex(/^~~([\S\s]+?)~~(?!_)/),
},
spoiler: {
order: defaultRules.text.order,
match: inlineRegex(/^\|\|([\S\s]+?)\|\|/),
parse: (capture, parse, state) => ({
content: parse(capture[1], state),
}),
react: (node, output, state) => (
{output(node.content, state)}
),
},
blockQuote: {
...defaultRules.blockQuote,
match: (source, state, previous) =>
!/^$|\n *$/.test(previous) || state.inQuote || state.nested