From 5f762345664551bc99cb12e0fe5e0c6c38b70b6e Mon Sep 17 00:00:00 2001
From: Season Chen <ccqgithub@users.noreply.github.com>
Date: Fri, 23 Dec 2016 13:08:23 +0800
Subject: [PATCH] support complex markdown

support <textarea data-template> `some code` </textarea>
---
 plugin/markdown/markdown.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js
index ad596bfd74e..bc2198aa733 100755
--- a/plugin/markdown/markdown.js
+++ b/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;