remark
Markdown processor powered by plugins
Last updated 7 months ago by wooorm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install remark 
SYNC missed versions from official npm registry.

remark Travis Coverage Downloads Size Chat

remark is a markdown processor powered by plugins part of the unified collective.

Don’t need the parser? Or the compiler? That’s OK.


Announcing the unified collective! ???? Read more about it on Medium »

Sponsors



???? ZEIT


???? Gatsby


???? Compositor


Holloway




You?

Installation

npm:

npm install remark

Usage

Common example

This example lints markdown and turns it into HTML.

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>
Settings through data

This example prettifies markdown and configures remark-parse and remark-stringify through data.

var remark = require('remark')

remark()
  .data('settings', {commonmark: true, emphasis: '*', strong: '*'})
  .process('_Emphasis_ and __importance__', function(err, file) {
    if (err) throw err
    console.log(String(file))
  })

Yields:

*Emphasis* and **importance**
Settings through a preset

This example prettifies markdown and configures remark-parse and remark-stringify through a preset.

var remark = require('remark')

remark()
  .use({
    settings: {commonmark: true, emphasis: '*', strong: '*'}
  })
  .process('_Emphasis_ and __importance__', function(err, file) {
    if (err) throw err
    console.log(String(file))
  })

Yields:

*Emphasis* and **importance**

License

MIT © Titus Wormer

Current Tags

  • 10.0.1                                ...           latest (7 months ago)
  • 4.0.0-alpha.4                                ...           next (3 years ago)

35 Versions

  • 10.0.1                                ...           7 months ago
  • 10.0.0                                ...           8 months ago
  • 9.0.0                                ...           a year ago
  • 8.0.0                                ...           2 years ago
  • 7.0.1                                ...           2 years ago
  • 7.0.0                                ...           2 years ago
  • 6.2.0                                ...           3 years ago
  • 6.0.1                                ...           3 years ago
  • 6.0.0                                ...           3 years ago
  • 5.1.0                                ...           3 years ago
  • 5.0.1                                ...           3 years ago
  • 5.0.0                                ...           3 years ago
  • 4.2.2                                ...           3 years ago
  • 4.2.1                                ...           3 years ago
  • 4.2.0                                ...           3 years ago
  • 4.1.2                                ...           3 years ago
  • 4.1.1                                ...           3 years ago
  • 4.1.0                                ...           3 years ago
  • 4.0.0                                ...           3 years ago
  • 4.0.0-alpha.4                                ...           3 years ago
  • 4.0.0-alpha.3                                ...           3 years ago
  • 4.0.0-alpha.2                                ...           3 years ago
  • 4.0.0-alpha.1                                ...           3 years ago
  • 3.2.3                                ...           3 years ago
  • 3.2.2                                ...           3 years ago
  • 3.2.1                                ...           3 years ago
  • 3.2.0                                ...           3 years ago
  • 3.1.3                                ...           3 years ago
  • 3.1.2                                ...           3 years ago
  • 3.1.1                                ...           3 years ago
  • 3.1.0                                ...           3 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 0.1.0                                ...           5 years ago
  • 0.0.1                                ...           6 years ago
Downloads
Today 53
This Week 12,433
This Month 24,315
Last Day 793
Last Week 10,518
Last Month 50,462
Dependencies (3)
Dev Dependencies (1)
Dependents (418)

Copyright 2014 - 2016 © taobao.org |