How to use the simple-markdown.defaultRules.autolink 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
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(/^&lt;(https?:\/\/[^ &gt;]+)&gt;/),
  },
  url: defaultRules.url,
  strong: defaultRules.strong,
  em: defaultRules.em,
  underline: defaultRules.u,
  inlineCode: {
    ...defaultRules.inlineCode,
    react: (node, _, state) =&gt; <code>{node.content}</code>,
  },
  shrug: {
    // Edge case for shrug emoji getting parsed as markup.
    order: defaultRules.text.order,
    match: inlineRegex(/^¯\\_\(ツ\)_\/¯/),
    parse: capture =&gt; ({
      type: "text",