0.1.4 • Published 7 years ago
mmark v0.1.4
mmark
A modern marked
Why?
- Actively maintained
- Rewrote in ES6 and bundled with Rollup for smaller size (15KB)
- Support more GFM extras like task lists
Install
yarn add mmark
You can find a CDN version at https://unpkg.com/mmark/
Usage
const mmark = require('mmark')
const html = mmark(`## hello world
A modern **markdown** parser!
- [ ] todo
- [x] done
`)
You can preview the HTML result here: https://egoistian.com/md2html/ (source)
API
mmark(src, options)
src
Type: string
Required: true
Input markdown string.
options
All marked options plus:
taskLists
Type: boolean
Default: true
Enable GFM task lists, this will only work if options.gfm
is true
.
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
mmark © egoist, Released under the MIT License. Authored and maintained by egoist with help from contributors (list).
egoistian.com · GitHub @egoist · Twitter @rem_rin_rin