aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorVonC <vonc@laposte.net>2013-10-10 11:45:39 +0200
committerVonC <vonc@laposte.net>2013-11-04 16:31:25 +0100
commitec72e8cbc7e97af9aae28a37a0b92829b2bfe301 (patch)
treef594fe56b1c135a6b6c2a9a889486672e71fd634 /plugin
parente1b11e737e3f39339e1ccd31096b17aa84bc7efb (diff)
downloadfosdem-2018-presentation-ec72e8cbc7e97af9aae28a37a0b92829b2bfe301.tar
fosdem-2018-presentation-ec72e8cbc7e97af9aae28a37a0b92829b2bfe301.tar.gz
Fix markdown vertical wrapping section element generation.
Diffstat (limited to 'plugin')
-rwxr-xr-xplugin/markdown/markdown.js3
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);