mark-stream

    0.0.2 • Public • Published

    marked-stream

    build status

    NPM

    Simple stream that takes a file path and returns a stream of html using marked. Contains sane defaults and highlighting with node-pygmentize-bundled.

    Example

    var path = require('path');
     
    var markedStream = require('marked-stream');
     
    var example = path.join(__dirname, 'example.md');
     
    //
    // You can also pass in `marked` options as second argument
    //
    var stream = markedStream(example);
     
    stream.on('error', console.log);
     
    stream.pipe(process.stdout)

    With the following input:

    # Example
     
    Here is an example Markdown file to use for the test
     
    ## Hello There

    The previous example outputs the following:

    <h1>Example</h1>
    <p>Here is an example Markdown file to use for the test</p>
    <h2>Hello There</h2>

    Test

    npm test

    License

    MIT

    Keywords

    none

    Install

    npm i mark-stream

    DownloadsWeekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • davidmarkclements