Whether code was highlighted during markdown-it rendering.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Mar 17, 2015
README.md Update link in readme Mar 13, 2016
UNLICENSE Initial commit Mar 17, 2015
index.es6.js Initial commit Mar 17, 2015
package.json Reorder package Jun 9, 2015
test.js Initial commit Mar 17, 2015

README.md

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