From a8ce7e93cd363efb6e210045af7629ef82189c3b Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Tue, 19 Jun 2012 11:58:09 -0600 Subject: [PATCH] Enable MathJax for live preview. --- lib/gollum/frontend/public/gollum/livepreview/index.html | 1 + .../public/gollum/livepreview/js/livepreview/livepreview.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/gollum/frontend/public/gollum/livepreview/index.html b/lib/gollum/frontend/public/gollum/livepreview/index.html index ae6219ab..17fd51cd 100644 --- a/lib/gollum/frontend/public/gollum/livepreview/index.html +++ b/lib/gollum/frontend/public/gollum/livepreview/index.html @@ -37,5 +37,6 @@ var require = { + diff --git a/lib/gollum/frontend/public/gollum/livepreview/js/livepreview/livepreview.js b/lib/gollum/frontend/public/gollum/livepreview/js/livepreview/livepreview.js index d8ad1235..1131901d 100644 --- a/lib/gollum/frontend/public/gollum/livepreview/js/livepreview/livepreview.js +++ b/lib/gollum/frontend/public/gollum/livepreview/js/livepreview/livepreview.js @@ -242,6 +242,7 @@ var makePreviewHtml = function () { // Update the text using feature detection to support IE. // preview.innerHTML = text; // this doesn't work on IE. previewSet( text ); + MathJax.Hub.Typeset( content ); // highlight code blocks. var codeElements = preview.getElementsByTagName( 'pre' );