* [bug] fixed render markdown file error like this:
authorRiceball LEE <snowyu.lee@gmail.com>
Tue, 30 Jul 2013 22:48:09 +0000 (06:48 +0800)
committerRiceball LEE <snowyu.lee@gmail.com>
Tue, 30 Jul 2013 23:12:29 +0000 (07:12 +0800)
```html
<section data-markdown>
<script type="text/template">
</script>
</section>
```

plugin/markdown/markdown.js

index 473666b87d2bb1b94b87119851a115ba2c659c1c..dcab2fab3faf6ccf021d3d09951b627fa13b0f5f 100755 (executable)
@@ -6,6 +6,14 @@
         throw 'The reveal.js Markdown plugin requires marked to be loaded';
     }
 
+    if (typeof hljs !== 'undefined') {
+        marked.setOptions({
+            highlight: function (lang, code) {
+                return hljs.highlightAuto(lang, code).value;
+            }
+        });
+    }
+
     var stripLeadingWhitespace = function(section) {
 
         var template = section.querySelector( 'script' );
@@ -28,7 +36,7 @@
     };
 
     var twrap = function(el) {
-      return '<script type="text/template">' + el + '</script>';
+      return marked(el);
     };
 
     var getForwardedAttributes = function(section) {
@@ -51,7 +59,7 @@
         }
 
         return result.join( ' ' );
-    }
+    };
 
     var slidifyMarkdown = function(markdown, separator, vertical, attributes) {
 
         for( var k = 0, klen = sectionStack.length; k < klen; k++ ) {
             // horizontal
             if( typeof sectionStack[k] === 'string' ) {
-                markdownSections += '<section '+ attributes +' data-markdown>' +  twrap( sectionStack[k] )  + '</section>';
+                markdownSections += '<section '+ attributes +'>' +  twrap( sectionStack[k] )  + '</section>';
             }
             // vertical
             else {
                 markdownSections += '<section '+ attributes +'>' +
-                                        '<section data-markdown>' +  sectionStack[k].map(twrap).join('</section><section data-markdown>') + '</section>' +
+                                        '<section>' +  sectionStack[k].map(twrap).join('</section><section>') + '</section>' +
                                     '</section>';
             }
         }