12 lines
345 B
JavaScript
12 lines
345 B
JavaScript
const Prism = require('prismjs');
|
|
const LiquidHighlight = require( "./LiquidHighlight" );
|
|
|
|
module.exports = function(liquidEngine) {
|
|
let highlight = new LiquidHighlight(liquidEngine);
|
|
|
|
highlight.addHook(function(language, htmlStr, lines) {
|
|
return Prism.highlight(htmlStr, Prism.languages[ language ]);
|
|
});
|
|
|
|
return highlight.getObject();
|
|
}; |