{"_id":"marked-extras","_rev":"91091","name":"marked-extras","description":"Extras for marked.js. Utils, language definitions, templates for custom headings and sensible defaults.","dist-tags":{"latest":"0.2.4"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:29:58.000Z","created":"2014-01-20T08:24:58.556Z","0.2.4":"2014-04-23T14:55:13.772Z","0.2.3":"2014-04-20T10:41:48.661Z","0.2.2":"2014-02-16T17:40:13.903Z","0.2.0":"2014-01-26T21:03:28.130Z","0.1.4":"2014-01-21T01:05:16.021Z","0.1.3":"2014-01-21T00:46:06.517Z","0.1.2":"2014-01-21T00:40:35.781Z","0.1.1":"2014-01-20T08:42:11.446Z","0.1.0":"2014-01-20T08:24:58.556Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/marked-extras.git"},"versions":{"0.2.4":{"name":"marked-extras","description":"Extras for marked.js. Utils, language definitions, templates for custom headings and sensible defaults.","version":"0.2.4","homepage":"https://github.com/jonschlinkert/marked-extras","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/marked-extras.git"},"bugs":{"url":"https://github.com/jonschlinkert/marked-extras/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/marked-extras/blob/master/LICENSE-MIT"}],"main":"index.js","dependencies":{"highlight.js":"~8.0.0","lodash":"~2.4.1","marked":"0.3.0","underscore.string":"~2.3.3"},"keywords":["convert markdown","gfm markdown","gfm","github markdown","handlebars helper","handlebars","helper","highlight.js","markdown headings","markdown to html","markdown","marked","md"],"_id":"marked-extras@0.2.4","dist":{"shasum":"6eb011db02b5d855445010c86e8d8cdb14b71ce8","size":6585,"noattachment":false,"key":"/marked-extras/-/marked-extras-0.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/marked-extras/download/marked-extras-0.2.4.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1398264913772,"_cnpm_publish_time":1398264913772,"_hasShrinkwrap":false},"0.2.3":{"name":"marked-extras","description":"Extras for marked.js. Utils, language definitions, templates for custom headings and sensible defaults.","version":"0.2.3","homepage":"https://github.com/jonschlinkert/marked-extras","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/marked-extras.git"},"bugs":{"url":"https://github.com/jonschlinkert/marked-extras/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/marked-extras/blob/master/LICENSE-MIT"}],"main":"index.js","dependencies":{"highlight.js":"~8.0.0","lodash":"~2.4.1","marked":"0.3.0","underscore.string":"~2.3.3"},"keywords":["convert markdown","gfm markdown","gfm","github markdown","handlebars helper","handlebars","helper","highlight.js","markdown headings","markdown to html","markdown","marked","md"],"_id":"marked-extras@0.2.3","dist":{"shasum":"ea4339f4975dfc081a6f248954de9985f201f5c5","size":6586,"noattachment":false,"key":"/marked-extras/-/marked-extras-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/marked-extras/download/marked-extras-0.2.3.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1397990508661,"_cnpm_publish_time":1397990508661,"_hasShrinkwrap":false},"0.2.2":{"name":"marked-extras","description":"Extras for marked.js. Utils, language definitions, templates for custom headings and sensible defaults.","version":"0.2.2","homepage":"https://github.com/jonschlinkert/marked-extras","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/marked-extras.git"},"bugs":{"url":"https://github.com/jonschlinkert/marked-extras/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/marked-extras/blob/master/LICENSE-MIT"}],"main":"index.js","dependencies":{"fs-utils":"~0.1.9","highlight.js":"~8.0.0","lodash":"~2.4.1","marked":"0.3.0","underscore.string":"~2.3.3"},"keywords":["convert markdown","gfm markdown","gfm","github markdown","handlebars helper","handlebars","helper","highlight.js","markdown headings","markdown to html","markdown","marked","md"],"_id":"marked-extras@0.2.2","dist":{"shasum":"9573ab36ccfe1bb735c2e33e46543b9eb98750ad","size":6300,"noattachment":false,"key":"/marked-extras/-/marked-extras-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/marked-extras/download/marked-extras-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1392572413903,"_hasShrinkwrap":false,"_cnpm_publish_time":1392572413903},"0.2.0":{"name":"marked-extras","description":"Extras for marked.js. Utils, language definitions, templates for custom headings and sensible defaults.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/marked-extras","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/marked-extras.git"},"bugs":{"url":"https://github.com/jonschlinkert/marked-extras/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/marked-extras/blob/master/LICENSE-MIT"}],"main":"index.js","dependencies":{"marked":"~0.3.0","underscore.string":"~2.3.3","highlight.js":"~8.0.0","lodash":"~2.4.1","fs-utils":"~0.1.9"},"keywords":["convert markdown","gfm markdown","gfm","github markdown","handlebars helper","handlebars","helper","highlight.js","markdown headings","markdown to html","markdown","marked","md"],"_id":"marked-extras@0.2.0","dist":{"shasum":"b359a057675bc360ab8f7159011c831fa80cdd12","size":6267,"noattachment":false,"key":"/marked-extras/-/marked-extras-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/marked-extras/download/marked-extras-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1390770208130,"_hasShrinkwrap":false,"_cnpm_publish_time":1390770208130},"0.1.4":{"name":"marked-extras","description":"Extras for marked.js. Utils, language definitions, templates for custom headings and sensible defaults.","version":"0.1.4","homepage":"https://github.com/jonschlinkert/marked-extras","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/marked-extras.git"},"bugs":{"url":"https://github.com/jonschlinkert/marked-extras/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/marked-extras/blob/master/LICENSE-MIT"}],"main":"index.js","dependencies":{"marked":"~0.3.0","underscore.string":"~2.3.3","highlight.js":"~8.0.0","lodash":"~2.4.1","fs-utils":"~0.1.9"},"keywords":["convert markdown","gfm markdown","gfm","github markdown","handlebars helper","handlebars","helper","highlight.js","markdown headings","markdown to html","markdown","marked","md"],"_id":"marked-extras@0.1.4","dist":{"shasum":"6f321ca602536f1af77ff668a695af33d43f203e","size":6279,"noattachment":false,"key":"/marked-extras/-/marked-extras-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/marked-extras/download/marked-extras-0.1.4.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1390266316021,"_hasShrinkwrap":false,"_cnpm_publish_time":1390266316021},"0.1.3":{"name":"marked-extras","description":"Extras for marked.js. Utils, language definitions, templates for custom headings and sensible defaults.","version":"0.1.3","homepage":"https://github.com/jonschlinkert/marked-extras","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/marked-extras.git"},"bugs":{"url":"https://github.com/jonschlinkert/marked-extras/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/marked-extras/blob/master/LICENSE-MIT"}],"main":"index.js","dependencies":{"marked":"~0.3.0","underscore.string":"~2.3.3","highlight.js":"~8.0.0","lodash":"~2.4.1","fs-utils":"~0.1.9"},"keywords":["convert markdown","gfm markdown","gfm","github markdown","handlebars helper","handlebars","helper","highlight.js","markdown headings","markdown to html","markdown","marked","md"],"_id":"marked-extras@0.1.3","dist":{"shasum":"d3a7ef47573f8e3796fbbf07da54c29dc09b6bf6","size":6266,"noattachment":false,"key":"/marked-extras/-/marked-extras-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/marked-extras/download/marked-extras-0.1.3.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1390265166517,"_hasShrinkwrap":false,"_cnpm_publish_time":1390265166517},"0.1.2":{"name":"marked-extras","description":"Extras for marked.js. Utils, language definitions, templates for custom headings and sensible defaults.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/marked-extras","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/marked-extras.git"},"bugs":{"url":"https://github.com/jonschlinkert/marked-extras/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/marked-extras/blob/master/LICENSE-MIT"}],"main":"index.js","dependencies":{"marked":"~0.3.0","underscore.string":"~2.3.3","highlight.js":"~8.0.0","lodash":"~2.4.1","fs-utils":"~0.1.9"},"keywords":["convert markdown","gfm markdown","gfm","github markdown","handlebars helper","handlebars","helper","highlight.js","markdown headings","markdown to html","markdown","marked","md"],"_id":"marked-extras@0.1.2","dist":{"shasum":"06d4b06d137bdba6782ab22b40018a74dbe72448","size":6272,"noattachment":false,"key":"/marked-extras/-/marked-extras-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/marked-extras/download/marked-extras-0.1.2.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1390264835781,"_hasShrinkwrap":false,"_cnpm_publish_time":1390264835781},"0.1.1":{"name":"marked-extras","description":"Extras for marked.js. Utils, language definitions, templates for custom headings and sensible defaults.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/marked-extras","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/marked-extras.git"},"bugs":{"url":"https://github.com/jonschlinkert/marked-extras/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/marked-extras/blob/master/LICENSE-MIT"}],"main":"index.js","dependencies":{"marked":"~0.3.0","underscore.string":"~2.3.3","highlight.js":"~8.0.0","lodash":"~2.4.1","fs-utils":"~0.1.9"},"keywords":["convert markdown","gfm markdown","gfm","github markdown","handlebars helper","handlebars","helper","highlight.js","markdown headings","markdown to html","markdown","marked","md"],"_id":"marked-extras@0.1.1","dist":{"shasum":"f27ba5791fe63e73d156cabb7485784d89ddf99d","size":5880,"noattachment":false,"key":"/marked-extras/-/marked-extras-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/marked-extras/download/marked-extras-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1390207331446,"_hasShrinkwrap":false,"_cnpm_publish_time":1390207331446},"0.1.0":{"name":"marked-extras","description":"Extras for marked.js. Utils, language definitions, templates for custom headings and sensible defaults.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/marked-extras","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"https://github.com/jonschlinkert/marked-extras.git"},"bugs":{"url":"https://github.com/jonschlinkert/marked-extras/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/marked-extras/blob/master/LICENSE-MIT"}],"main":"index.js","dependencies":{"marked":"~0.3.0","underscore.string":"~2.3.3","highlight.js":"~8.0.0","lodash":"~2.4.1","fs-utils":"~0.1.9"},"keywords":["convert markdown","gfm markdown","gfm","github markdown","handlebars helper","handlebars","helper","highlight.js","markdown headings","markdown to html","markdown","marked","md"],"_id":"marked-extras@0.1.0","dist":{"shasum":"c1a0cf017a8f77987477ec03f53806817f8752c0","size":5894,"noattachment":false,"key":"/marked-extras/-/marked-extras-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/marked-extras/download/marked-extras-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"publish_time":1390206298556,"_hasShrinkwrap":false,"_cnpm_publish_time":1390206298556}},"readme":"# marked-extras [![NPM version](https://badge.fury.io/js/marked-extras.png)](http://badge.fury.io/js/marked-extras)\r\n\r\n> Extras, utils, language definitions and defaults for marked.js\r\n\r\nIf you find a bug or have a feature request, [please create an issue](https://github.com/helpers/marked-extras/issues).\r\n\r\n## Installation\r\nUse [npm](npmjs.org) to install the package\r\n\r\n```\r\nnpm i marked-extras --save\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nvar marked = require('marked');\r\nvar extras = require('marked-extras');\r\n\r\n// Example node module\r\nmodule.exports = function (str, options) {\r\n  options = options || {};\r\n\r\n  // Initialize marked extras\r\n  extras.init(options);\r\n\r\n  // Set marked.js options\r\n  marked.setOptions(extras.markedDefaults);\r\n\r\n  // do stuff...\r\n  // ...\r\n\r\n  // Convert markdown to HTML\r\n  return marked(str);\r\n};\r\n```\r\n\r\n### Highlighting\r\n\r\nAlso be sure to add the [highlight.js](http://highlightjs.org/usage/) scripts to your HTML:\r\n\r\n```html\r\n<script src=\"js/highlight.js\"></script>\r\n<!-- or, a customized version -->\r\n<script src=\"js/highlight.pack.js\"></script>\r\n\r\n<script>hljs.initHighlightingOnLoad();</script>\r\n```\r\n\r\n## Options\r\n\r\nThe following example shows the actual defaults used in this lib, and how they can be customized:\r\n\r\n```js\r\nvar opts = {\r\n  renderer: renderer,\r\n  gfm: true,\r\n  tables: true,\r\n  breaks: false,\r\n  pedantic: false,\r\n  sanitize: false,\r\n  smartLists: true,\r\n  smartypants: false,\r\n\r\n  // highlight.js options\r\n  prefix: 'lang-',\r\n  tabReplace: ' ',\r\n  highlight: function (code, lang) {\r\n    console.log(languages[lang]);\r\n    try {\r\n      if (languages[lang]) {\r\n        lang = languages[lang];\r\n      } else {\r\n        return code;\r\n      }\r\n      return hljs.highlight(lang, code).value;\r\n    } catch(e) {\r\n      return hljs.highlightAuto(code).value;\r\n    }\r\n  }\r\n};\r\n\r\nvar markedOpts = _.extend(extras.markedDefaults, opts);\r\n\r\n// Define marked.js options\r\nmarked.setOptions(markedOpts);\r\n```\r\n\r\n## Contributing\r\nIn lieu of a formal styleguide, take care to maintain the existing coding style.\r\n\r\n## Authors\r\n\r\n**Jon Schlinkert**\r\n\r\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\r\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\r\n\r\n**Brian Woodward**\r\n\r\n+ [github/doowb](https://github.com/doowb)\r\n+ [twitter/doowb](http://twitter.com/jonschlinkert)\r\n\r\n\r\n## License\r\nCopyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.\r\nReleased under the MIT license","_attachments":{},"homepage":"https://github.com/jonschlinkert/marked-extras","bugs":{"url":"https://github.com/jonschlinkert/marked-extras/issues"}}