zorro-remark
v8.0.3
Published
Markdown processor powered by plugins
Downloads
1
Maintainers
Readme
remark
The remark processor is a markdown processor powered by plug-ins.
- Interface by unified
- MDAST syntax tree
- Parses markdown to the tree with remark-parse
- Plug-ins transform the tree
- Compiles the tree to markdown using remark-stringify
Don’t need the parser? Or the compiler? That’s OK.
Installation
npm:
npm install remark
Usage
var remark = require('remark');
var recommended = require('remark-preset-lint-recommended');
var html = require('remark-html');
var report = require('vfile-reporter');
remark()
.use(recommended)
.use(html)
.process('## Hello world!', function (err, file) {
console.error(report(err || file));
console.log(String(file));
});
Yields:
1:1 warning Missing newline character at end of file final-newline remark-lint
⚠ 1 warning
<h2>Hello world!</h2>