diff options
Diffstat (limited to 'public/js')
-rwxr-xr-x | public/js/reveal-markdown.js | 2 | ||||
-rw-r--r-- | public/js/slide.js | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/public/js/reveal-markdown.js b/public/js/reveal-markdown.js index ca22e09c..a969967c 100755 --- a/public/js/reveal-markdown.js +++ b/public/js/reveal-markdown.js @@ -355,7 +355,7 @@ var rendered = md.render(markdown); rendered = preventXSS(rendered); var result = postProcess(rendered); - section.innerHTML = result[0].outerHTML; + section.innerHTML = result[0].innerHTML; addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) || section.parentNode.getAttribute( 'data-element-attributes' ) || DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR, diff --git a/public/js/slide.js b/public/js/slide.js index 795f47be..4c2f1ff9 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -55,10 +55,14 @@ viewAjaxCallback = function () { }; function renderSlide(event) { - var title = document.title; - finishView($(event.currentSlide)); - document.title = title; - Reveal.layout(); + var markdown = $(event.currentSlide); + if (!markdown.attr('data-rendered')) { + var title = document.title; + finishView(markdown); + markdown.attr('data-rendered', 'true'); + document.title = title; + Reveal.layout(); + } } Reveal.addEventListener('ready', renderSlide); |