From d6b8e4a246eab2e17cf63f86423d3e96e111ace4 Mon Sep 17 00:00:00 2001
From: VonC <vonc@laposte.net>
Date: Fri, 11 Oct 2013 08:47:02 +0200
Subject: [PATCH] Rebased on dev, and following contribution guideline.

---
 plugin/markdown/markdown.js | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js
index 084ba41..cf2dd29 100755
--- a/plugin/markdown/markdown.js
+++ b/plugin/markdown/markdown.js
@@ -130,7 +130,7 @@
 
 		var separatorRegex = new RegExp( options.separator + ( options.verticalSeparator ? '|' + options.verticalSeparator : '' ), 'mg' ),
 			horizontalSeparatorRegex = new RegExp( options.separator ),
-			slideAttributesSeparatorRegex = new RegExp( options.slideAttributesSeparator, 'm');
+			slideAttributesSeparatorRegex = new RegExp( options.slideAttributesSeparator, 'm' );
 
 		var matches,
 			lastIndex = 0,
@@ -181,22 +181,22 @@
 				// The 'data-xxx' attributes of the first child must be set on the wrapping parent section to be effective
 				// Mainly for data-transition (otherwise, it is ignored for the first vertical slide)
 				firstChild = sectionStack[i][0];
-				matchAttributes = slideAttributesSeparatorRegex.exec(firstChild);
+				matchAttributes = slideAttributesSeparatorRegex.exec( firstChild );
 				slideAttributes = matchAttributes ? matchAttributes[1] : "";
 				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
 					// 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 + '>';
 
 				sectionStack[i].forEach( function( child ) {
-					matchAttributes = slideAttributesSeparatorRegex.exec(child);
+					matchAttributes = slideAttributesSeparatorRegex.exec( child );
 					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>';
 				} );
@@ -204,9 +204,9 @@
 				markdownSections += '</section>';
 			}
 			else {
-				matchAttributes = slideAttributesSeparatorRegex.exec(sectionStack[i]);
+				matchAttributes = slideAttributesSeparatorRegex.exec( sectionStack[i] );
 				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>';
 			}
-- 
2.26.2