File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 throw 'The reveal.js Markdown plugin requires marked to be loaded' ;
77 }
88
9+ if ( typeof hljs !== 'undefined' ) {
10+ marked . setOptions ( {
11+ highlight : function ( lang , code ) {
12+ return hljs . highlightAuto ( lang , code ) . value ;
13+ }
14+ } ) ;
15+ }
16+
917 var stripLeadingWhitespace = function ( section ) {
1018
1119 var template = section . querySelector ( 'script' ) ;
2836 } ;
2937
3038 var twrap = function ( el ) {
31- return '<script type="text/template">' + el + '</script>' ;
39+ return marked ( el ) ;
3240 } ;
3341
3442 var getForwardedAttributes = function ( section ) {
5159 }
5260
5361 return result . join ( ' ' ) ;
54- }
62+ } ;
5563
5664 var slidifyMarkdown = function ( markdown , separator , vertical , attributes ) {
5765
101109 for ( var k = 0 , klen = sectionStack . length ; k < klen ; k ++ ) {
102110 // horizontal
103111 if ( typeof sectionStack [ k ] === 'string' ) {
104- markdownSections += '<section ' + attributes + ' data-markdown >' + twrap ( sectionStack [ k ] ) + '</section>' ;
112+ markdownSections += '<section ' + attributes + '>' + twrap ( sectionStack [ k ] ) + '</section>' ;
105113 }
106114 // vertical
107115 else {
108116 markdownSections += '<section ' + attributes + '>' +
109- '<section data-markdown >' + sectionStack [ k ] . map ( twrap ) . join ( '</section><section data-markdown >' ) + '</section>' +
117+ '<section>' + sectionStack [ k ] . map ( twrap ) . join ( '</section><section>' ) + '</section>' +
110118 '</section>' ;
111119 }
112120 }
You can’t perform that action at this time.
0 commit comments