Socket
Socket
Sign inDemoInstall

remark-mdx

Package Overview
Dependencies
41
Maintainers
1
Versions
125
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    remark-mdx

Support import, export, and JSX in markdown


Version published
Weekly downloads
2.9M
increased by0.08%
Maintainers
1
Install size
2.08 MB
Created
Weekly downloads
 

Package description

What is remark-mdx?

The remark-mdx npm package is a plugin for remark, a markdown processor powered by plugins part of the unified collective. It enables MDX syntax in markdown documents processed by remark. MDX is an authorable format that lets you seamlessly write JSX in your markdown documents. This package allows you to parse and serialize MDX files, making it possible to use MDX with the remark ecosystem.

What are remark-mdx's main functionalities?

Parsing MDX syntax

This feature allows you to parse strings of MDX and transform them into a markdown abstract syntax tree (AST).

const remark = require('remark');
const remarkMdx = require('remark-mdx');

remark().use(remarkMdx).processSync('<h1>Hello, MDX!</h1>').toString();

Serializing MDX

This feature enables you to serialize the markdown AST back into a string of MDX, which can then be saved to a file or processed further.

const remark = require('remark');
const remarkMdx = require('remark-mdx');
const vfile = require('to-vfile');

const file = vfile.readSync('example.mdx');
const result = remark().use(remarkMdx).processSync(file).toString();
console.log(result);

Other packages similar to remark-mdx

Readme

Source

@mdx-js/remark-mdx

Build Status lerna Join the community on Spectrum

:warning: This project is currently in alpha

MDX syntax support for remark.

Installation

npm install --save remark-mdx

Contribute

See contributing.md in mdx-js/mdx for ways to get started.

This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.

License

MIT © Titus Wormer and John Otander

Keywords

FAQs

Last updated on 12 Feb 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc