Skip to content
Snippets Groups Projects
Commit 34afc564 authored by ynonp's avatar ynonp
Browse files

Update markdown.js

Allow HTML tags in external markdown files
parent 7081f901
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,11 @@
return text;
};
var twrap = function(el) {
return '<script type="text/template">' + el + '</script>';
};
var slidifyMarkdown = function(markdown, separator, vertical) {
separator = separator || '^\n---\n$';
......@@ -74,8 +78,8 @@
// flatten the hierarchical stack, and insert <section data-markdown> tags
for( var k = 0, klen = sectionStack.length; k < klen; k++ ) {
markdownSections += typeof sectionStack[k] === 'string'
? '<section data-markdown>' + sectionStack[k] + '</section>'
: '<section><section data-markdown>' + sectionStack[k].join('</section><section data-markdown>') + '</section></section>';
? '<section data-markdown>' + twrap( sectionStack[k] ) + '</section>'
: '<section><section data-markdown>' + sectionStack[k].map(twrap).join('</section><section data-markdown>') + '</section></section>';
}
return markdownSections;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment