diff options
author | Season Chen <ccqgithub@users.noreply.github.com> | 2016-12-23 13:08:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-23 13:08:23 +0800 |
commit | 5f762345664551bc99cb12e0fe5e0c6c38b70b6e (patch) | |
tree | b72ba3664a0834ffff69318dae8674c0541583eb /plugin/markdown/markdown.js | |
parent | 713702a0ab81d1756a30e6c14ae49afd42135541 (diff) | |
download | perl-software-in-gnu-guix-5f762345664551bc99cb12e0fe5e0c6c38b70b6e.tar perl-software-in-gnu-guix-5f762345664551bc99cb12e0fe5e0c6c38b70b6e.tar.gz |
support complex markdown
support <textarea data-template> `some code` </textarea>
Diffstat (limited to 'plugin/markdown/markdown.js')
-rwxr-xr-x | plugin/markdown/markdown.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js index ad596bf..bc2198a 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; |