Socket
Book a DemoInstallSign in
Socket

virtual-markdown

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

virtual-markdown

Convert markdown into virtual-dom

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

virtual-markdown stability

npm version build status test coverage downloads js-standard-style

Convert markdown into virtual-dom. Uses remark and remark-html under the hood.

Installation

$ npm install virtual-markdown

Usage

const highlight = require('mdast-highlight')
const md = require('virtual-markdown')

module.exports = render

function render (h) {
  const text = `
    # funky town, get down, get down
    - or how I learned to love the bomb
  `

  return h('section.main', [
    md(text, {
      use: [ highlight ],
      footnotes: true
    })
  ])
}

API

tree = md(markdown, opts?)

Takes a string of markdown and returns a virtual-dom widget. Takes the following options:

  • use: array of remark plugins to use
  • all other options are passed directy to remark.process()

See Also

License

MIT

Keywords

virtual

FAQs

Package last updated on 04 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts