* [bug] the markdown plugin can not render highlight codes for marked.setOptions(highlight)

This commit is contained in:
Riceball LEE
2015-11-11 07:37:08 +00:00
parent 6952931451
commit 16ebf2a783
4 changed files with 67 additions and 2 deletions

View File

@ -20,8 +20,8 @@
if( typeof hljs !== 'undefined' ) {
marked.setOptions({
highlight: function( lang, code ) {
return hljs.highlightAuto( lang, code ).value;
highlight: function( code, lang ) {
return hljs.highlightAuto( code, [lang] ).value;
}
});
}