How to use the simple-markdown.defaultRules.del function in simple-markdown

To help you get started, we’ve selected a few simple-markdown examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jaylineko / discohook / src / markup / parseMarkup.tsx View on Github external
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