fix code highlighting in markdown decks
parent
d54353c4e1
commit
34458a988a
File diff suppressed because one or more lines are too long
|
@ -15,11 +15,10 @@ export default {
|
||||||
* current reveal.js deck.
|
* current reveal.js deck.
|
||||||
*/
|
*/
|
||||||
init: function( deck ) {
|
init: function( deck ) {
|
||||||
|
if( typeof window.hljs !== 'undefined' ) {
|
||||||
if( typeof hljs !== 'undefined' ) {
|
|
||||||
marked.setOptions({
|
marked.setOptions({
|
||||||
highlight: function( code, lang ) {
|
highlight: function( code, lang ) {
|
||||||
return hljs.highlightAuto( code, [lang] ).value;
|
return window.hljs.highlightAuto( code, lang ? [lang] : null ).value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue