@@ -17,18 +17,6 @@
 | 
			
		||||
	}
 | 
			
		||||
}( this, function( marked ) {
 | 
			
		||||
 | 
			
		||||
	if( typeof marked === 'undefined' ) {
 | 
			
		||||
		throw 'The reveal.js Markdown plugin requires marked to be loaded';
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if( typeof hljs !== 'undefined' ) {
 | 
			
		||||
		marked.setOptions({
 | 
			
		||||
			highlight: function( code, lang ) {
 | 
			
		||||
				return hljs.highlightAuto( code, [lang] ).value;
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var DEFAULT_SLIDE_SEPARATOR = '^\r?\n---\r?\n$',
 | 
			
		||||
		DEFAULT_NOTES_SEPARATOR = 'note:',
 | 
			
		||||
		DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$',
 | 
			
		||||
@@ -189,7 +177,7 @@
 | 
			
		||||
				markdownSections += '<section '+ options.attributes +'>';
 | 
			
		||||
 | 
			
		||||
				sectionStack[i].forEach( function( child ) {
 | 
			
		||||
					markdownSections += '<section data-markdown>' +  createMarkdownSlide( child, options ) + '</section>';
 | 
			
		||||
					markdownSections += '<section data-markdown>' + createMarkdownSlide( child, options ) + '</section>';
 | 
			
		||||
				} );
 | 
			
		||||
 | 
			
		||||
				markdownSections += '</section>';
 | 
			
		||||
@@ -391,6 +379,24 @@
 | 
			
		||||
	return {
 | 
			
		||||
 | 
			
		||||
		initialize: function() {
 | 
			
		||||
			if( typeof marked === 'undefined' ) {
 | 
			
		||||
				throw 'The reveal.js Markdown plugin requires marked to be loaded';
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if( typeof hljs !== 'undefined' ) {
 | 
			
		||||
				marked.setOptions({
 | 
			
		||||
					highlight: function( code, lang ) {
 | 
			
		||||
						return hljs.highlightAuto( code, [lang] ).value;
 | 
			
		||||
					}
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			var options = Reveal.getConfig().markdown;
 | 
			
		||||
 | 
			
		||||
			if ( options ) {
 | 
			
		||||
				marked.setOptions( options );
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			processSlides();
 | 
			
		||||
			convertSlides();
 | 
			
		||||
		},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user