/mdannotation

A collection of posthtml plugins to enable annotations in your Markdown

Primary LanguageJavaScript

Markdown Annotation

A collection of posthtml plugins to enable annotations in your Markdown.

Plugins

How to use it

To use an annotation plugin on Markdown content, you should first convert it with your favorite markdown converter. Then you could process the html with posthtml.

npm i markdown --save 
npm i posthtml --save
const markdown = require('markdown').markdown;
const posthtml = require('posthtml');
const annotationPlugin = require('mdannotation-plugin');

const html = markdown.toHTML(md);
return posthtml()
		.use(annotationPlugin)
		.process(html)
		.then(function (result) {
				console.log(result.html);
		})
;

Run tests

We use Lerna to manage our monorepos.

# node modules loading
lerna bootstrap

# Run tests accross every packages
lerna run test