PIMD Prism Plugin

Uses Prism to highlight code blocks.

Example usage

# Example usage

Add the language to a code block:

```html
<p>Example</p>
```

Or for JavaScript:

```javascript
alert("Hello world!")
```

Alternatively a file name with suffix can be used:

```index.html
<p>Example</p>
```

Setup

npm i pimd @pimd/prism-plugin
const { Document } = require("pimd") const Config = require("pimd/lib/config")
const prismPlugin = require("@pimd/prism-plugin") const config = new Config() config.use(prismPlugin) const markdown = `
\`\`\`html <p>Example</p> \`\`\`
`
const doc = new Document(markdown, config) console.log(doc.render())

Copyright

Copyright 2018++ Nico Hagenburger. See MIT-LICENSE for details. Get in touch with @hagenburger on Twitter or open an issue.