marked3
A markdown parser and compiler. Built for speed.
Last updated 2 years ago by rem .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install marked3 
SYNC missed versions from official npm registry.

marked3

NPM version NPM downloads Build Status codecov donate

This is a fork of 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 marked3

You can find a CDN version at https://unpkg.com/marked3/

Usage

const marked3 = require('marked3')

const html = marked3(`## hello world

A modern **markdown** parser!

- [ ] todo
- [x] done
`)

You can preview the HTML result here: https://egoist.moe/md2html/ (source)

API

marked3(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.

linksInNewTab

Type: boolean | (href: string) => boolean
Default: undefined

Open links in a new window/tab.

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

Development

# lint and unit test
yarn test

# lint only
yarn lint

# fix lint issues
yarn lint -- --fix

Author

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

egoist.moe · GitHub @egoist · Twitter @_egoistlily

Current Tags

  • 0.5.2                                ...           latest (2 years ago)

7 Versions

  • 0.5.2                                ...           2 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.2                                ...           3 years ago
  • 0.3.1                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 22
This Month 87
Last Day 15
Last Week 30
Last Month 39
Dependencies (1)
Dev Dependencies (8)

Copyright 2014 - 2016 © taobao.org |