Browse Source

Merge branch 'patch-2' of https://github.com/ccqgithub/reveal.js into dev

Hakim El Hattab 8 năm trước cách đây
mục cha
commit
37f3da6095
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      plugin/markdown/markdown.js

+ 2 - 2
plugin/markdown/markdown.js

@@ -30,8 +30,8 @@
 	 * element. Normalizes leading tabs/whitespace.
 	 */
 	function getMarkdownFromSlide( section ) {
-
-		var template = section.querySelector( 'script' );
+		// support <textarea data-template> `some code` </textarea>
+		var template = section.querySelector( '[data-tempate]' ) || section.querySelector( 'script' );
 
 		// strip leading whitespace so it isn't evaluated as code
 		var text = ( template || section ).textContent;