markdown-transform
Light streaming wrapper around the marked markdown parser. Useful for passing to APIs that expect a stream compliant interface. Note that marked itself does not support streams so the entire markdown string is buffered in memory.
Installation
npm install markdown-transform
Options
Supports passthrough of all the marked options. As a shorthand, rather than passing a function to the highlight
option, you can simply pass true
which will perform syntax highlighting with highlight.js.
Usage
var markdownTransform = ; fs ;
Express middleware
app;
Express Api Proxy
Works seamlessly for transforming Markdown API responses to HTML with the express-api-proxy.
// Express appappall'/proxy' endpoints: pattern: /raw\.githubusercontent\.com\/.*\.md/ transform: highlight:true ; // Browser app$;