remark-ssb-mentions

2.5.0 • Public • Published

remark-ssb-mentions

Extract the mentions in an SSB message, just using the markdown. This is mostly compatible with the way Manyverse does it, but simpler, because it relies only on the markdown.

const mentions = require('remark-ssb-mentions')

const ary = mentions(markdown, opts)

This is basically the same as ssb-mentions, but implemented with Unified instead of ssb-marked.

options

  • bareFeedNames (boolean, default false): if true, include stub mention objects for bare feed name mentions, in the format {name: "NAME", link: "@"}. these can then have the link filled in with a feed id, to make a "patchwork-style mention", or be removed from the mentions array before publishing.

License

MIT

Package Sidebar

Install

npm i remark-ssb-mentions

Weekly Downloads

20

Version

2.5.0

License

MIT

Unpacked Size

5.61 kB

Total Files

4

Last publish

Collaborators

  • staltz