aboutsummaryrefslogtreecommitdiff
path: root/plugin/markdown
diff options
context:
space:
mode:
authorynonp <ynonperek@gmail.com>2013-03-01 18:47:26 +0200
committerynonp <ynonperek@gmail.com>2013-03-01 18:47:26 +0200
commit34afc564cd58142656773eb04626a001c9527024 (patch)
treee84ca7bc0bd5fd13e9826724b30185d51be39a24 /plugin/markdown
parent7081f901da553206f746c40c4a0c1b5773697cf2 (diff)
downloadperl-software-in-gnu-guix-34afc564cd58142656773eb04626a001c9527024.tar
perl-software-in-gnu-guix-34afc564cd58142656773eb04626a001c9527024.tar.gz
Update markdown.js
Allow HTML tags in external markdown files
Diffstat (limited to 'plugin/markdown')
-rw-r--r--plugin/markdown/markdown.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js
index 39e1168..b6b5a9b 100644
--- a/plugin/markdown/markdown.js
+++ b/plugin/markdown/markdown.js
@@ -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;