I'm using marked to convert some markdown code to html, which has some code blocks. So I want to use google-code-prettify to highlight the code.
Marked has provided a callback for code, as documented:
marked.setOptions({
gfm: true,
pedantic: false,
sanitize: true,
// callback for code highlighter
highlight: function(code, lang) {
if (lang === 'js') {
return javascriptHighlighter(code);
}
return code;
}
});
But I don't find a method like javascritHighlighter(..)
from google-code-prettify. How to let them work together?