* [bug] the markdown plugin can not render highlight codes for marked.setOptions(highlight)
This commit is contained in:
parent
6952931451
commit
16ebf2a783
4 changed files with 67 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue