# markdown-it-prism2

> Highlights code blocks in markdown-it using Prism.

Latest version **1.1.4** (published 2018-01-06) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install markdown-it-prism2
pnpm add markdown-it-prism2
yarn add markdown-it-prism2
bun add markdown-it-prism2
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2018-01-06 |
| First published | 2018-01-06 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 95 |
| Author | Joshua Gleitze |
| Maintainers | zhouhancheng |
| Keywords | markdown-it, markdown-it-plugin, highlight, prism, prismjs |

## Links

- npm: https://www.npmjs.com/package/markdown-it-prism2
- Repository: https://github.com/jGleitz/markdown-it-prism
- Issues: https://github.com/jGleitz/markdown-it-prism/issues
- npm.io page: https://npm.io/package/markdown-it-prism2

## Dependencies (3)

- [bel](https://npm.io/package/bel.md) ^5.1.5
- [endent](https://npm.io/package/endent.md) ^1.1.1
- [prismjs](https://npm.io/package/prismjs.md) ^1.9.0

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 1.1.4 (latest) — 2018-01-06
- 1.1.3 — 2018-01-06
- 1.1.2 — 2018-01-06

## README

# markdown-it-prism [![Build Status](https://travis-ci.org/jGleitz/markdown-it-prism.svg?branch=master)](https://travis-ci.org/jGleitz/markdown-it-prism) [![Dependency Status](https://gemnasium.com/badges/github.com/jGleitz/markdown-it-prism.svg)](https://gemnasium.com/github.com/jGleitz/markdown-it-prism) [![npm version](https://badge.fury.io/js/markdown-it-prism.svg)](https://badge.fury.io/js/markdown-it-prism) [![Bower version](https://badge.fury.io/bo/markdown-it-prism.svg)](https://badge.fury.io/bo/markdown-it-prism)
> [markdown-it](https://github.com/markdown-it/markdown-it) plugin to highlight code blocks using [Prism](http://prismjs.com/)

## Usage
```js
const md = require('markdown-it')();
const prism = require('markdown-it-prism');

md.use(prism, options);
```

### Options
The `options` object may contain:

Name   | Description | Default
-------|-------------|--------
`plugins` | Array of [Prism Plugins](http://prismjs.com/#plugins) to load. The names to use can be found [here](https://github.com/PrismJS/prism/tree/master/plugins). Please note that some prism plugins (notably line-numbers) rely on the DOM being present and can thus not be used with this package (see [#1](https://github.com/jGleitz/markdown-it-prism/issues/1)). | `[]`
`init` | A function called after setting up prism. Will receive the prism instance as only argument. Useful for plugins needing further intialisation. | `() => {}`

---
_Source: https://npm.io/package/markdown-it-prism2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
