mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-10 16:47:28 +02:00
fix code highlighting in markdown decks
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user