diff options
-rw-r--r-- | js/reveal.js | 12 |
1 files changed, 12 insertions, 0 deletions
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<len; i++) { + var thisDom = cblocks[i]; + var html = thisDom.innerHTML; + html = html.replace(/</g,"<").replace(/>/g,">"); + thisDom.innerHTML = html; + } + } + } /** |