node-prismjs
An adapter which make it easier to use Prism in Node.js.
Usage
Installation:
npm install --save node-prismjs
In Node.js
const Prism = require('node-prismjs');
function highlight(lang, sourceCode) {
const language = Prism.languages[lang] || Prism.languages.autoit;
return Prism.highlight(sourceCode, language);
}
License
MIT