@motes/md
v0.10.0
Published
Markdown parser for Motes.in
Downloads
4
Readme
@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:
- markdown-it
- markdown-it-abbr
- markdown-it-anchor
- markdown-it-attrs
- markdown-it-block-embed
- markdown-it-block-image
- markdown-it-center-text
- markdown-it-checkbox
- markdown-it-container
- markdown-it-custom-block
- markdown-it-deflist
- markdown-it-emoji
- markdown-it-expand-tabs
- markdown-it-footnote
- markdown-it-hashmention
- markdown-it-highlighted
- markdown-it-highlightjs
- markdown-it-imsize
- markdown-it-ins
- markdown-it-kbd
- markdown-it-mark
- markdown-it-math
- markdown-it-multimd-table
- markdown-it-plantuml
- markdown-it-playground
- markdown-it-smartarrows
- markdown-it-sub
- markdown-it-sup
- markdown-it-table-of-contents
- markdown-it-task-checkbox
- markdown-it-title
- markdown-it-underline