support complex markdown

support <textarea data-template> `some code` </textarea>
This commit is contained in:
Season Chen 2016-12-23 13:08:23 +08:00 committed by GitHub
parent 713702a0ab
commit 5f76234566
1 changed files with 2 additions and 2 deletions

View File

@ -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;