0.1.2 • Published 7 years ago

markdown-it-markeval v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

markeval

NPM version NPM downloads CircleCI donate

Install

yarn add markdown-it markdown-it-markeval

Usage

const md = require('markdown-it')()
const markeval = require('markdown-it-markeval')

const html = md
  .use(markeval, {
    // Required if you want to require from relative path or `node_modules`
    cwd: process.cwd() // default
  })
  .render('markdown code')

Example

Input:

This is your pokemon:

```js
// @markeval
module.exports = require('pokemon').random()
```

Output:

This is your pokemon:

Pikacho

Syntax

  • Add // @markeval comment into the code block
  • Or three backticks + markeval: ```markeval

The code blocks that match the syntax with be replaced by the exported content.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

markeval © egoist, Released under the MIT License. Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @rem_rin_rin

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.0

7 years ago