Fix markdown vertical wrapping section element generation.
This commit is contained in:
parent
e1b11e737e
commit
ec72e8cbc7
1 changed files with 2 additions and 1 deletions
|
@ -183,14 +183,15 @@
|
||||||
firstChild = sectionStack[i][0];
|
firstChild = sectionStack[i][0];
|
||||||
matchAttributes = slideAttributesSeparatorRegex.exec(firstChild);
|
matchAttributes = slideAttributesSeparatorRegex.exec(firstChild);
|
||||||
slideAttributes = matchAttributes ? matchAttributes[1] : "";
|
slideAttributes = matchAttributes ? matchAttributes[1] : "";
|
||||||
|
dataAttributes = "";
|
||||||
if( slideAttributes != "") {
|
if( slideAttributes != "") {
|
||||||
// console.log('all attr=' + slideAttributes );
|
// console.log('all attr=' + slideAttributes );
|
||||||
// http://stackoverflow.com/questions/18025762/javascript-regex-replace-all-word-characters-except-word-characters-between-ch
|
// 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.
|
// Keep only data-attributes for the parent slide section.
|
||||||
dataAttributes = slideAttributes.replace(/(data-\S+=\"[^\"]+?\")|\w|[\"=]/g, function(a, b) { return b || ''; });
|
dataAttributes = slideAttributes.replace(/(data-\S+=\"[^\"]+?\")|\w|[\"=]/g, function(a, b) { return b || ''; });
|
||||||
// console.log('new attr=' + dataAttributes );
|
// console.log('new attr=' + dataAttributes );
|
||||||
markdownSections += '<section '+ options.attributes + ' ' + dataAttributes + '>';
|
|
||||||
}
|
}
|
||||||
|
markdownSections += '<section '+ options.attributes + ' ' + dataAttributes + '>';
|
||||||
|
|
||||||
sectionStack[i].forEach( function( child ) {
|
sectionStack[i].forEach( function( child ) {
|
||||||
matchAttributes = slideAttributesSeparatorRegex.exec(child);
|
matchAttributes = slideAttributesSeparatorRegex.exec(child);
|
||||||
|
|
Loading…
Reference in a new issue