Skip to content
Snippets Groups Projects
Commit ec72e8cb authored by VonC's avatar VonC
Browse files

Fix markdown vertical wrapping section element generation.

parent e1b11e73
No related branches found
No related tags found
No related merge requests found
......@@ -183,14 +183,15 @@
firstChild = sectionStack[i][0];
matchAttributes = slideAttributesSeparatorRegex.exec(firstChild);
slideAttributes = matchAttributes ? matchAttributes[1] : "";
dataAttributes = "";
if( slideAttributes != "") {
// console.log('all attr=' + slideAttributes );
// http://stackoverflow.com/questions/18025762/javascript-regex-replace-all-word-characters-except-word-characters-between-ch
// Keep only data-attributes for the parent slide section.
dataAttributes = slideAttributes.replace(/(data-\S+=\"[^\"]+?\")|\w|[\"=]/g, function(a, b) { return b || ''; });
// console.log('new attr=' + dataAttributes );
markdownSections += '<section '+ options.attributes + ' ' + dataAttributes + '>';
}
markdownSections += '<section '+ options.attributes + ' ' + dataAttributes + '>';
sectionStack[i].forEach( function( child ) {
matchAttributes = slideAttributesSeparatorRegex.exec(child);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment