aboutsummaryrefslogtreecommitdiff
path: root/plugin/markdown/markdown.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/markdown/markdown.js')
-rwxr-xr-xplugin/markdown/markdown.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js
index 29aabf5..d9ff1ba 100755
--- a/plugin/markdown/markdown.js
+++ b/plugin/markdown/markdown.js
@@ -31,7 +31,8 @@
*/
function getMarkdownFromSlide( section ) {
- var template = section.querySelector( 'script' );
+ // look for a <script> or <textarea data-template> wrapper
+ var template = section.querySelector( '[data-template]' ) || section.querySelector( 'script' );
// strip leading whitespace so it isn't evaluated as code
var text = ( template || section ).textContent;