0.10.0 • Published 2 years ago

@motes/md v0.10.0

Weekly downloads
6
License
MIT
Repository
github
Last release
2 years ago

@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