aboutsummaryrefslogtreecommitdiff
path: root/plugin/markdown
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2017-01-31 15:02:26 +0100
committerHakim El Hattab <hakim.elhattab@gmail.com>2017-01-31 15:02:26 +0100
commit37f3da60958d789a3a96536b502398abe35a6efa (patch)
tree633a060f17e8fec5d489f50b24e043ec7fcf66b7 /plugin/markdown
parent3617eaccb64efeaa2c3958d20840c65618f04979 (diff)
parent5f762345664551bc99cb12e0fe5e0c6c38b70b6e (diff)
downloadperl-software-in-gnu-guix-37f3da60958d789a3a96536b502398abe35a6efa.tar
perl-software-in-gnu-guix-37f3da60958d789a3a96536b502398abe35a6efa.tar.gz
Merge branch 'patch-2' of https://github.com/ccqgithub/reveal.js into dev
Diffstat (limited to 'plugin/markdown')
-rwxr-xr-xplugin/markdown/markdown.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js
index 29aabf5..aad7f63 100755
--- a/plugin/markdown/markdown.js
+++ b/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;