1
0
Fork 0

Remove console.log debugs, and fix tabs

This commit is contained in:
VonC 2013-10-29 14:28:29 +01:00
parent 492a094955
commit 2cdd1afe85
2 changed files with 2 additions and 6 deletions

View File

@ -185,11 +185,9 @@
slideAttributes = matchAttributes ? matchAttributes[1] : ""; slideAttributes = matchAttributes ? matchAttributes[1] : "";
dataAttributes = ""; dataAttributes = "";
if( slideAttributes != "" ) { if( 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 );
} }
markdownSections += '<section '+ options.attributes + ' ' + dataAttributes + '>'; markdownSections += '<section '+ options.attributes + ' ' + dataAttributes + '>';
@ -197,7 +195,6 @@
matchAttributes = slideAttributesSeparatorRegex.exec( child ); matchAttributes = slideAttributesSeparatorRegex.exec( child );
slideAttributes = matchAttributes ? matchAttributes[1] : ""; slideAttributes = matchAttributes ? matchAttributes[1] : "";
child = matchAttributes ? child.replace( slideAttributesSeparatorRegex,"" ) : child child = matchAttributes ? child.replace( slideAttributesSeparatorRegex,"" ) : child
// console.log('slide attributes ' + options.slideAttributesSeparator + ' => ' + slideAttributes)
markdownSections += '<section ' + slideAttributes + ' data-markdown>' + createMarkdownSlide( child, options ) + '</section>'; markdownSections += '<section ' + slideAttributes + ' data-markdown>' + createMarkdownSlide( child, options ) + '</section>';
} ); } );
@ -207,7 +204,6 @@
matchAttributes = slideAttributesSeparatorRegex.exec( sectionStack[i] ); matchAttributes = slideAttributesSeparatorRegex.exec( sectionStack[i] );
slideAttributes = matchAttributes ? matchAttributes[1] : ""; slideAttributes = matchAttributes ? matchAttributes[1] : "";
content = matchAttributes ? sectionStack[i].replace( slideAttributesSeparatorRegex,"" ) : sectionStack[i] content = matchAttributes ? sectionStack[i].replace( slideAttributesSeparatorRegex,"" ) : sectionStack[i]
// console.log('Slide attributes ' + options.slideAttributesSeparator + ' => ' + slideAttributes)
markdownSections += '<section '+ options.attributes + ' ' + slideAttributes +' data-markdown>' + createMarkdownSlide( content, options ) + '</section>'; markdownSections += '<section '+ options.attributes + ' ' + slideAttributes +' data-markdown>' + createMarkdownSlide( content, options ) + '</section>';
} }
} }

View File

@ -25,8 +25,8 @@
<section data-markdown data-separator="^\n\n\n" <section data-markdown data-separator="^\n\n\n"
data-vertical="^\n\n" data-vertical="^\n\n"
data-notes="^Note:" data-notes="^Note:"
data-attributes="^\s*?--\s(.*?)$" data-attributes="^\s*?--\s(.*?)$"
data-charset="utf-8"> data-charset="utf-8">
<script type="text/template"> <script type="text/template">
# Test attributes in Markdown # Test attributes in Markdown
## Slide 1 ## Slide 1