Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remark-mentions

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-mentions

remark plugin to replace @ mentions with links

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
530
decreased by-41.57%
Maintainers
1
Weekly downloads
 
Created
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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc