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

remark-rehype

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-rehype

rehype support for remark

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.4M
increased by2.07%
Maintainers
1
Weekly downloads
 
Created

What is remark-rehype?

The remark-rehype npm package is a plugin that transforms Markdown (.md) files into HTML. It is part of the unified ecosystem and is commonly used to integrate with other unified plugins to process and manipulate content.

What are remark-rehype's main functionalities?

Markdown to HTML conversion

This feature allows you to convert Markdown content into HTML. The code sample demonstrates how to set up a unified processor that parses Markdown, converts it to HTML using remark-rehype, and then serializes it to a string.

const unified = require('unified');
const markdown = require('remark-parse');
const remark2rehype = require('remark-rehype');
const html = require('rehype-stringify');

unified()
  .use(markdown)
  .use(remark2rehype)
  .use(html)
  .process('# Hello world!', function (err, file) {
    if (err) throw err;
    console.log(String(file));
  });

Integration with unified ecosystem

remark-rehype can be used in conjunction with other plugins in the unified ecosystem, such as rehype-format for formatting the resulting HTML. The code sample shows how to include the rehype-format plugin in the processing pipeline.

const unified = require('unified');
const markdown = require('remark-parse');
const remark2rehype = require('remark-rehype');
const rehypeFormat = require('rehype-format');
const html = require('rehype-stringify');

unified()
  .use(markdown)
  .use(remark2rehype)
  .use(rehypeFormat)
  .use(html)
  .process('# Hello world!', function (err, file) {
    if (err) throw err;
    console.log(String(file));
  });

Other packages similar to remark-rehype

Keywords

FAQs

Package last updated on 04 Dec 2017

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