fix markdown typo, update comment #1780

This commit is contained in:
Hakim El Hattab 2017-01-31 15:02:51 +01:00
parent 37f3da6095
commit 02a6b0515e
1 changed files with 3 additions and 2 deletions

View File

@ -30,8 +30,9 @@
* element. Normalizes leading tabs/whitespace.
*/
function getMarkdownFromSlide( section ) {
// support <textarea data-template> `some code` </textarea>
var template = section.querySelector( '[data-tempate]' ) || 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;