JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 33142
  • Score
    100M100P100Q146189F
  • License MIT

Plugin for prettifying markdown with Remarkable using custom renderer rules.

Package Exports

  • pretty-remarkable

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pretty-remarkable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pretty-remarkable NPM version

Plugin for prettifying markdown with Remarkable using custom renderer rules.

Install

Install with npm

$ npm i pretty-remarkable --save

Usage

var prettify = require('pretty-remarkable');

Examples

var prettify = require('pretty-remarkable');
var Remarkable = require('remarkable');
var md = new Remarkable();

// register the plugin
md.use(prettify);
var result = md.render('\n\n\n# foo\n\n\nbar\n# baz');
//=> '# foo\n\nbar\n\n# baz'

Or create a function if you need to export it or need a more reusable format:

var prettify = require('pretty-remarkable');
var Remarkable = require('remarkable');

function pretty(str, options) {
  return new Remarkable()
    .use(prettify)
    .render(str);
}

pretty('\n\n\n# foo\n\n\nbar\n# baz');
//=> '# foo\n\nbar\n\n# baz'

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb on December 16, 2015.