always use 'i' as iterator
authorHakim El Hattab <hakim.elhattab@gmail.com>
Sat, 24 Aug 2013 15:06:52 +0000 (11:06 -0400)
committerHakim El Hattab <hakim.elhattab@gmail.com>
Sat, 24 Aug 2013 15:06:52 +0000 (11:06 -0400)
plugin/markdown/markdown.js

index 552b32c0e05571531796eb2aa4e1beebc1dc1b06..31d22f17586fe4f6b2664b6fa80ff22aec30068e 100755 (executable)
                var markdownSections = '';
 
                // flatten the hierarchical stack, and insert <section data-markdown> tags
-               for( var k = 0, klen = sectionStack.length; k < klen; k++ ) {
+               for( var i = 0, len = sectionStack.length; i < len; i++ ) {
                        // vertical
-                       if( sectionStack[k].propertyIsEnumerable( length ) && typeof sectionStack[k].splice === 'function' ) {
+                       if( sectionStack[i].propertyIsEnumerable( length ) && typeof sectionStack[i].splice === 'function' ) {
                                markdownSections += '<section '+ options.attributes +'>' +
-                                                                               '<section data-markdown>' +  sectionStack[k].map( createMarkdownSlide ).join( '</section><section data-markdown>' ) + '</section>' +
+                                                                               '<section data-markdown>' +  sectionStack[i].map( createMarkdownSlide ).join( '</section><section data-markdown>' ) + '</section>' +
                                                                        '</section>';
                        }
                        else {
-                               markdownSections += '<section '+ options.attributes +' data-markdown>' + createMarkdownSlide( sectionStack[k] ) + '</section>';
+                               markdownSections += '<section '+ options.attributes +' data-markdown>' + createMarkdownSlide( sectionStack[i] ) + '</section>';
                        }
                }
 
                var sections = document.querySelectorAll( '[data-markdown]'),
                        section;
 
-               for( var j = 0, jlen = sections.length; j < jlen; j++ ) {
+               for( var i = 0, len = sections.length; i < len; i++ ) {
 
-                       section = sections[j];
+                       section = sections[i];
 
                        if( section.getAttribute( 'data-markdown' ).length ) {