support complex markdown
support <textarea data-template> `some code` </textarea>
This commit is contained in:
parent
713702a0ab
commit
5f76234566
|
@ -42,8 +42,8 @@
|
||||||
* element. Normalizes leading tabs/whitespace.
|
* element. Normalizes leading tabs/whitespace.
|
||||||
*/
|
*/
|
||||||
function getMarkdownFromSlide( section ) {
|
function getMarkdownFromSlide( section ) {
|
||||||
|
// support <textarea data-template> `some code` </textarea>
|
||||||
var template = section.querySelector( 'script' );
|
var template = section.querySelector( '[data-tempate]' ) || section.querySelector( 'script' );
|
||||||
|
|
||||||
// strip leading whitespace so it isn't evaluated as code
|
// strip leading whitespace so it isn't evaluated as code
|
||||||
var text = ( template || section ).textContent;
|
var text = ( template || section ).textContent;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user