github-markdown-render
Render markdown using the GitHub Markdown API
Last updated 4 years ago by kevva .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install github-markdown-render 
SYNC missed versions from official npm registry.

github-markdown-render Build Status

Render markdown using the GitHub Markdown API

Install

$ npm install --save github-markdown-render

Usage

const fs = require('fs');
const githubMarkdownRender = require('github-markdown-render');

githubMarkdownRender('**foo**').then(data => {
	console.log(data);
	//=> '<p><strong>foo</strong></p>'
});

fs.createReadStream('readme.md')
	.pipe(githubMarkdownRender.stream())
	.pipe(fs.createWriteStream('index.html'));

API

githubMarkdownRender(markdown)

Returns a promise with the rendered HTML.

markdown

Required
Type: string

Markdown to be rendered.

githubMarkdownRender.stream()

Creates a Readable/Writable stream which you can pipe markdown to.

CLI

$ npm install --global github-markdown-render
$ github-markdown-render --help

  Usage
    $ github-markdown-render **foo**
    $ cat readme.md | github-markdown-render

License

MIT © Kevin Mårtensson

Current Tags

  • 2.1.0                                ...           latest (4 years ago)

6 Versions

  • 2.1.0                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 1
Last Month 8
Dependencies (2)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |