|
@@ -178,12 +178,25 @@
|
|
|
for( var i = 0, len = sectionStack.length; i < len; i++ ) {
|
|
|
|
|
|
if( sectionStack[i] instanceof Array ) {
|
|
|
- markdownSections += '<section '+ options.attributes +'>';
|
|
|
+
|
|
|
+
|
|
|
+ firstChild = sectionStack[i][0];
|
|
|
+ matchAttributes = slideAttributesSeparatorRegex.exec(firstChild);
|
|
|
+ slideAttributes = matchAttributes ? matchAttributes[1] : "";
|
|
|
+ if( slideAttributes != "") {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ dataAttributes = slideAttributes.replace(/(data-\S+=\"[^\"]+?\")|\w|[\"=]/g, function(a, b) { return b || ''; });
|
|
|
+
|
|
|
+ markdownSections += '<section '+ options.attributes + ' ' + dataAttributes + '>';
|
|
|
+ }
|
|
|
|
|
|
sectionStack[i].forEach( function( child ) {
|
|
|
matchAttributes = slideAttributesSeparatorRegex.exec(child);
|
|
|
slideAttributes = matchAttributes ? matchAttributes[1] : "";
|
|
|
child = matchAttributes ? child.replace(slideAttributesSeparatorRegex,"") : child
|
|
|
+
|
|
|
markdownSections += '<section ' + slideAttributes + ' data-markdown>' + createMarkdownSlide( child, options ) + '</section>';
|
|
|
} );
|
|
|
|