highlight.js plugin for markdown-it.
yarn add markdown-it-highlight
import markdownIt from 'markdown-it'
import markdownItHighlight from 'markdown-it-highlight'
const mdi = markdownIt()
mdi.use(markdownItHighlight)
mdi.render(`
print 'hello world'
`) // <pre><code>print 'hello world'</code></pre>
You also need to import the css:
import 'markdown-it-highlight/dist/index.css'
Or you can add the css to the web page directly.
yarn build:watch
yarn test
yarn release && npm publish