Преглед на файлове

support complex markdown

support <textarea data-template> `some code` </textarea>
Season Chen преди 8 години
родител
ревизия
5f76234566
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      plugin/markdown/markdown.js

+ 2 - 2
plugin/markdown/markdown.js

@@ -42,8 +42,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;