jstransformer-marked

1.4.0 • Public • Published

jstransformer-marked

Marked support for JSTransformers.

Build Status Coverage Status NPM version

Installation

npm install jstransformer-marked

API

const marked = require('jstransformer')(require('jstransformer-marked'));

marked.render('# Hello World!').body
//=> '<h1>Hello World!</h1>'

const markedOptions = {}
marked.render('# "Hello World"', markedOptions)

// also supports async walkTokens
marked.renderAsync('# Hello World', {
  walkTokens: async (token) => {
    const uriPrefix  = await uriPrefixAsync()
    if (token.href) {
      token.href = uriPrefix + token.href
    }
  }
})

For all supported options see https://marked.js.org/using_advanced#options

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i jstransformer-marked

Weekly Downloads

3,261

Version

1.4.0

License

MIT

Unpacked Size

3.84 kB

Total Files

4

Last publish

Collaborators

  • robloach
  • forbeslindesay
  • stoeffel
  • hemanth
  • timothygu
  • calebeby
  • webketje