From: Raymond Camden Date: Wed, 1 May 2013 19:29:56 +0000 (-0500) Subject: Adds support for auto escaping HTML in code blocks. X-Git-Tag: 2.4.0~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0441c26be1bc0df805db9313827309a08c98487a;p=reveal.js.git Adds support for auto escaping HTML in code blocks. --- diff --git a/js/reveal.js b/js/reveal.js index a4a71db..f9590d5 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -235,6 +235,18 @@ var Reveal = (function(){ dom.controlsNext = toArray( document.querySelectorAll( '.navigate-next' ) ); } + //Auto scape code blocks + var cblocks = document.querySelectorAll("pre code"); + + if(cblocks.length) { + for(var i=0, len=cblocks.length; i/g,">"); + thisDom.innerHTML = html; + } + } + } /**