fix code highlighting in markdown decks
This commit is contained in:
parent
d54353c4e1
commit
34458a988a
2 changed files with 3 additions and 4 deletions
2
dist/plugin/markdown.js
vendored
2
dist/plugin/markdown.js
vendored
File diff suppressed because one or more lines are too long
|
@ -15,11 +15,10 @@ export default {
|
|||
* current reveal.js deck.
|
||||
*/
|
||||
init: function( deck ) {
|
||||
|
||||
if( typeof hljs !== 'undefined' ) {
|
||||
if( typeof window.hljs !== 'undefined' ) {
|
||||
marked.setOptions({
|
||||
highlight: function( code, lang ) {
|
||||
return hljs.highlightAuto( code, [lang] ).value;
|
||||
return window.hljs.highlightAuto( code, lang ? [lang] : null ).value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue