marked-extras
Extras, utils, language definitions and defaults for marked.js
If you find a bug or have a feature request, please create an issue.
Installation
Use npm to install the package
npm i marked-extras --save
Usage
var marked = ;var extras = ; // Example node modulemodule { options = options || {}; // Initialize marked extras extras; // Set marked.js options marked; // do stuff... // ... // Convert markdown to HTML return ;};
Highlighting
Also be sure to add the highlight.js scripts to your HTML:
<!-- or, a customized version -->
Options
The following example shows the actual defaults used in this lib, and how they can be customized:
var opts = renderer: renderer gfm: true tables: true breaks: false pedantic: false sanitize: false smartLists: true smartypants: false // highlight.js options prefix: 'lang-' tabReplace: ' ' { console; try if languageslang lang = languageslang; else return code; return hljsvalue; catche return hljsvalue; }; var markedOpts = _; // Define marked.js optionsmarked;
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style.
Authors
Jon Schlinkert
Brian Woodward
License
Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors. Released under the MIT license