diff options
author | VonC <vonc@laposte.net> | 2013-10-10 11:45:39 +0200 |
---|---|---|
committer | VonC <vonc@laposte.net> | 2013-11-04 16:31:25 +0100 |
commit | ec72e8cbc7e97af9aae28a37a0b92829b2bfe301 (patch) | |
tree | f594fe56b1c135a6b6c2a9a889486672e71fd634 /plugin | |
parent | e1b11e737e3f39339e1ccd31096b17aa84bc7efb (diff) | |
download | fosdem-2018-presentation-ec72e8cbc7e97af9aae28a37a0b92829b2bfe301.tar fosdem-2018-presentation-ec72e8cbc7e97af9aae28a37a0b92829b2bfe301.tar.gz |
Fix markdown vertical wrapping section element generation.
Diffstat (limited to 'plugin')
-rwxr-xr-x | plugin/markdown/markdown.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js index 23b522e..084ba41 100755 --- a/plugin/markdown/markdown.js +++ b/plugin/markdown/markdown.js @@ -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); |