Socket
Socket
Sign inDemoInstall

remark-html

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-html

remark plugin to compile Markdown to HTML


Version published
Weekly downloads
270K
increased by3.7%
Maintainers
2
Weekly downloads
 
Created

What is remark-html?

The remark-html package is a plugin for the remark processor that allows you to convert Markdown content into HTML. It is part of the unified collective, which provides a suite of tools for processing and transforming content.

What are remark-html's main functionalities?

Convert Markdown to HTML

This feature allows you to convert Markdown content into HTML. The code sample demonstrates how to use the remark processor with the remark-html plugin to transform a Markdown string into HTML.

const remark = require('remark');
const html = require('remark-html');

remark()
  .use(html)
  .process('# Hello World!', function (err, file) {
    if (err) throw err;
    console.log(String(file));
  });

Customizing HTML Output

This feature allows you to customize the HTML output. In this example, the `sanitize` option is set to `false`, which means that HTML tags in the Markdown content will not be sanitized and will be included in the output.

const remark = require('remark');
const html = require('remark-html');

remark()
  .use(html, { sanitize: false })
  .process('# Hello <em>World</em>!', function (err, file) {
    if (err) throw err;
    console.log(String(file));
  });

Other packages similar to remark-html

Keywords

FAQs

Package last updated on 07 Sep 2021

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