You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

remark-mentions

Package Overview
Dependencies
4
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-mentions

remark plugin to replace @ mentions with links


Version published
Weekly downloads
709
decreased by-9.8%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

remark-mentions

Build Coverage

What is this?

This package is a unified (remark) plugin to convert @ mentions to links: @wooorm -> [**@wooorm**](https://github.com/wooorm).

unified is a project that transforms content with abstract syntax trees (ASTs). remark adds support for markdown to unified. mdast is the markdown AST that remark uses. This is a remark plugin that transforms mdast.

Install

npm install remark-mentions

Usage

import {remark} from 'remark'
import remarkMentions from 'remark-mentions'

const markdown = "Hello @user!";

const file = await remark()
  .use(remarkMentions, {
    usernameLink: (username) => `/User/Profile/${username}`, // This is optional
  })
  .process(markdown)

console.log(String(file))

Keywords

FAQs

Package last updated on 11 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc