How to use the ssb-ref.msgIdRegex function in ssb-ref

To help you get started, we’ve selected a few ssb-ref 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 staltz / manyverse / src / frontend / components / Markdown.ts View on Github external
function Markdown(markdownText: string) {
  const linkifySsbFeeds = linkifyRegex(Ref.feedIdRegex);
  const linkifySsbMsgs = linkifyRegex(Ref.msgIdRegex);

  return $(ReactMarkdown, {
    source: remark()
      .use(gemojiToEmoji)
      .use(linkifySsbFeeds)
      .use(linkifySsbMsgs)
      .use(imagesToSsbServeBlobs)
      .processSync(markdownText).contents,
    astPlugins: [normalizeForReactNative()],
    allowedTypes: Object.keys(renderers),
    renderers,
  });
}