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

markdown-it-external-anchor

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-external-anchor

Mark external, absolute links with necessary attributes

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
decreased by-47.5%
Maintainers
1
Weekly downloads
 
Created
Source

MarkdownIt External Anchor

npm bundle size CI Test

Mark external, absolute links with appropriate rel & target attributes

  • Prevents XSS attacks & provides good UX
  • Does not affect HTML within markdown

Note: If you want anything, just open an issue or contact me.

Install

$ npm install --save markdown-it markdown-it-external-anchor

Usage

const md = require("markdown-it")();
md.use(require("markdown-it-external-anchor"), {
    domain: "example.net",
    class: "external"
});

md.render("[text](https://example.com)");

Options

  • domain (default: null) - A domain which is considered an internal link. (no "https://"). When provided, localhost is also added.
  • class (default: null) - a class name, for CSS purposes

License

MIT © Binyamin Green

Keywords

FAQs

Package last updated on 24 Nov 2020

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