function updatetab(url, pane) {
// http://docs.mathjax.org/en/latest/tex.html
    // From http://stackoverflow.com/a/651735
    var ext = url.split('.').pop().toLowerCase();
    var ismd = true;
    if ($.inArray(ext, ['md', 'markdown', 'mdown', 'mkdn', 'mkd', 'mdtxt', 'mdtext']) == -1) {
      ismd = false;
    }
    $.get(url, function(data) {
        if (ismd) {
          var delimiters=[["\\\[","\\\]"],["\\\(","\\\)"]]
          var runderscore = function(match){
              return match.replace(/\_/gmi,'\\_');
          }
          for( i=0; i<delimters.length;i++){
            regst= delimeters[i][0]+"([\s\S]*?)"+delimeters[i][0];
            regex=new RegExp(pattern,"gmi");
            data= data.replace(regex,runderscore); // Handle underscore by \_    
          }
          // only change if _ is within math symbols http://stackoverflow.com/a/1454936
          console.log(data);
          $('#my-pagination-content').html(marked(data));
          MathJax.Hub.Register.MessageHook("End Process", function (message) {
            $('#my-pagination-content').html( marked(data));
          });
        } else {
          $('#my-pagination-content').html(data);
          MathJax.Hub.Queue(["Typeset", MathJax.Hub, "my-pagination-content"]);
        }
        console.log('makerbutton');
        makerbutton(); //Update buttons.
        pane.tab('show');
    });
  }



@@ -550,21 +550,23 @@
  i=0; i%3C
+ 
 delim
+i
 ters.len
@@ -569,16 +569,17 @@
 .length;
+ 
 i++)%7B%0A  
@@ -596,25 +596,25 @@
 regst= delim
-e
+i
 ters%5Bi%5D%5B0%5D+%22
@@ -630,17 +630,17 @@
 )%22+delim
-e
+i
 ters%5Bi%5D%5B

Update updatetab.js