Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function assign (rule, order, object = {}) {
return Object.assign({}, rule, { order }, object)
}
// function ignoreScope (rule) {
// return Object.assign(rule, {
// match: anyScopeRegex(rule.match.regex)
// })
// }
// function ignoreScopeAssign (rule, order, object = {}) {
// return ignoreScope(assign(rule, order, object))
// }
const previewRules = {
Array: defaultRules.Array,
// strong: ignoreScopeAssign(defaultRules.strong, 1), // bold
// em: ignoreScopeAssign(defaultRules.em, 1), // italics
// ubold: assign(ignoreScope(defaultRules.u), 2, { react: defaultRules.strong.react }),
// del: ignoreScopeAssign(defaultRules.del, 3),
// inlineCode: ignoreScopeAssign(defaultRules.inlineCode, 12),
text: assign(defaultRules.text, 100)
}
const rules = Object.assign({
// new mailto (open chat in dc?)
// blockQuote ? (requires css; could be used for replies)
// mentions? (this component requires somekind of access to the chat memberlist)
// codeBlock: assign(defaultRules.codeBlock, 11, {
// react: function (node, output, state) {
// var className = node.lang
// ? 'markdown-code markdown-code-' + node.lang
// : undefined