@gerhobbelt/markdown-it-highlighted

1.0.1-2 • Public • Published

markdown-it-highlighted npm version

Whether code was highlighted during markdown-it rendering.

Usage

const md = require('markdown-it')({ highlight: yourHighlighter })
  .use(require('markdown-it-highlighted'))

const env = {}

md.render('```js\nconsole.log(42)\n```', env)
env.highlighted === true // Assuming your highlighter handled the code.

md.render('# Hello, world!', env)
env.highlighted === false

Readme

Keywords

Package Sidebar

Install

npm i @gerhobbelt/markdown-it-highlighted

Weekly Downloads

1

Version

1.0.1-2

License

Unlicense

Unpacked Size

4.16 kB

Total Files

5

Last publish

Collaborators

  • gerhobbelt