@motes/md

0.10.0 • Public • Published

@motes/md

Markdown parser for Motes.in.

Usage

const md = require('@motes/md')({
  hashtag: '/tags/', // default prefix for hashtag url
  mention: '/users/', // default prefix for mention url
  tocLevel: [1,2], // default level for table-of-content
  containers: [ // default container classes
    'container',
  ],
});

console.log(md.render('# Markdown'));

// you can pass an object to get the some values from the parsing
const env = {};
const html = md.render('# Markdown', env);
console.log(html, env);

It returns an instance of markdown-it, so it's possible to to add more plugins.

Credits

@motes/md uses the following packages:

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i @motes/md

Weekly Downloads

4

Version

0.10.0

License

MIT

Unpacked Size

10.5 kB

Total Files

5

Last publish

Collaborators

  • iamso