remark-mdc
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

remark-mdc

Remark plugin to support MDC Syntax

Install

# Using Yarn
yarn add --dev remark-mdc
# Using NPM
npm install --save-dev remark-mdc

Use

import { unified } from 'unified';
import parse from 'remark-parse';
import remarkMDC from 'remark-mdc';

function compiler() {
  this.Compiler = function(root) {
    return root;
  }
}

export async function markdownToAST(markdown) {
  let stream = unified()
    .use(parse)
    .use(remarkMDC)
    .use(compiler);

  const file = await stream.process(markdown);
  return file.result;
}

💻 Development

  • Clone the repository
  • Install dependencies using pnpm install
  • Prepare using pnpm run dev:prepare
  • Try the playground using pnpm run dev

License

MIT - Made with 💚

Readme

Keywords

Package Sidebar

Install

npm i remark-mdc

Weekly Downloads

21,185

Version

2.1.0

License

MIT

Unpacked Size

60.7 kB

Total Files

6

Last publish

Collaborators

  • farnabaz