unexpected-markdown

6.0.1 • Public • Published

This module uses the markdown parser marked to generate html output from markdown files.

NPM version Build Status Coverage Status

In addition to what marked already offers, this module uses magicpen-prism to syntax highlight code blocks and uses unexpected to evaluate JavaScript code examples.

Right now the documentation for this plugin is pretty lacking, until that is fixed the best example on how to use the plugin is to look at how it is used in unexpected.

An example is a JavaScript code block:

```js
helloWorld()
```

If you expect the example to fail, you can follow the code block with an expected output block:

```output
Error: Silence this is a library!
```

There are a few things you can achieve more then what is explained above, like async examples with promises and skiping examples for different environments or just skipping evaluation altogether. For now you'll have to look at how unexpected does it to learn the ticks.

/unexpected-markdown/

    Package Sidebar

    Install

    npm i unexpected-markdown

    Weekly Downloads

    89

    Version

    6.0.1

    License

    MIT

    Unpacked Size

    36.5 kB

    Total Files

    16

    Last publish

    Collaborators

    • munter
    • joelmukuthu
    • gustavnikolaj
    • alexjeffburke
    • papandreou
    • sunesimonsen