I use angular-marked in my website. And I want highlight code in markdown. I read the Readme docs, in the set default options optional section, when I use the code in my project
markedProvider.setOptions({
gfm: true,
tables: true,
highlight: function (code) {
return hljs.highlightAuto(code).value;
}
});
and I have added highlight.js and .css references, according the Highlight.js doc
but Jshint complain 'hljs' not defined. Please help me, how to fix this?
have you include the highlight js file before
setOptions
?Here is my code (using requirejs and angularAMD)